Skip to content

Commit b2adc9b

Browse files
Add missing prophecy trait
1 parent 222f002 commit b2adc9b

File tree

8 files changed

+22
-1
lines changed

8 files changed

+22
-1
lines changed

tests/Functional/Command/ScheduleSystemTasksCommandTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ protected function setUp(): void
1111
{
1212
self::bootKernel();
1313
if ('doctrine' !== self::$kernel->getContainer()->getParameter('kernel.storage')) {
14-
return $this->markTestSkipped('This testcase will only be called for doctrine storage.');
14+
$this->markTestSkipped('This testcase will only be called for doctrine storage.');
1515
}
1616

1717
parent::setUp();

tests/Unit/Builder/TaskBuilderFactoryTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,16 @@
33
namespace Unit\Builder;
44

55
use PHPUnit\Framework\TestCase;
6+
use Prophecy\PhpUnit\ProphecyTrait;
67
use Task\Scheduler\TaskSchedulerInterface;
78
use Task\TaskBundle\Builder\TaskBuilder;
89
use Task\TaskBundle\Builder\TaskBuilderFactory;
910
use Task\TaskInterface;
1011

1112
class TaskBuilderFactoryTest extends TestCase
1213
{
14+
use ProphecyTrait;
15+
1316
public function testCreate()
1417
{
1518
$task = $this->prophesize(TaskInterface::class);

tests/Unit/Builder/TaskBuilderTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace Task\TaskBundle\Unit\Builder;
44

55
use PHPUnit\Framework\TestCase;
6+
use Prophecy\PhpUnit\ProphecyTrait;
67
use Task\Scheduler\TaskSchedulerInterface;
78
use Task\TaskBundle\Builder\NotSupportedMethodException;
89
use Task\TaskBundle\Builder\TaskBuilder;
@@ -11,6 +12,8 @@
1112

1213
class TaskBuilderTest extends TestCase
1314
{
15+
use ProphecyTrait;
16+
1417
public function testSetSystemKey()
1518
{
1619
$task = $this->prophesize(Task::class);

tests/Unit/Command/ScheduleSystemTasksCommandTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
use Cron\CronExpression;
66
use PHPUnit\Framework\TestCase;
77
use Prophecy\Argument;
8+
use Prophecy\PhpUnit\ProphecyTrait;
89
use Symfony\Component\Console\Input\StringInput;
910
use Symfony\Component\Console\Output\OutputInterface;
1011
use Task\Execution\TaskExecutionInterface;
@@ -19,6 +20,8 @@
1920

2021
class ScheduleSystemTasksCommandTest extends TestCase
2122
{
23+
use ProphecyTrait;
24+
2225
/**
2326
* @var TaskSchedulerInterface
2427
*/

tests/Unit/DependencyInjection/HandlerCompilerPassTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
namespace Task\TaskBundle\Unit\DependencyInjection;
1313

1414
use PHPUnit\Framework\TestCase;
15+
use Prophecy\PhpUnit\ProphecyTrait;
1516
use Symfony\Component\DependencyInjection\ContainerBuilder;
1617
use Symfony\Component\DependencyInjection\Definition;
1718
use Symfony\Component\DependencyInjection\Reference;
@@ -22,6 +23,8 @@
2223
*/
2324
class HandlerCompilerPassTest extends TestCase
2425
{
26+
use ProphecyTrait;
27+
2528
public function testProcess()
2629
{
2730
$container = $this->prophesize(ContainerBuilder::class);

tests/Unit/EventListener/RunListenerTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
namespace Task\TaskBundle\Tests\Unit\EventListener;
1313

1414
use PHPUnit\Framework\TestCase;
15+
use Prophecy\PhpUnit\ProphecyTrait;
1516
use Symfony\Component\EventDispatcher\Event as LegacyEvent;
1617
use Symfony\Contracts\EventDispatcher\Event;
1718
use Task\Runner\TaskRunnerInterface;
@@ -22,6 +23,8 @@
2223
*/
2324
class RunListenerTest extends TestCase
2425
{
26+
use ProphecyTrait;
27+
2528
public function testRun()
2629
{
2730
if (\class_exists(LegacyEvent::class)) {

tests/Unit/EventListener/TaskExecutionListenerTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
use Doctrine\ORM\EntityManagerInterface;
1515
use PHPUnit\Framework\TestCase;
16+
use Prophecy\PhpUnit\ProphecyTrait;
1617
use Task\Event\TaskExecutionEvent;
1718
use Task\TaskBundle\EventListener\DoctrineTaskExecutionListener;
1819

@@ -21,6 +22,8 @@
2122
*/
2223
class TaskExecutionListenerTest extends TestCase
2324
{
25+
use ProphecyTrait;
26+
2427
public function testClearEntityManagerAfterTask()
2528
{
2629
$entityManager = $this->prophesize(EntityManagerInterface::class);

tests/Unit/Executor/SeparateProcessExecutorTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
namespace Task\TaskBundle\Tests\Unit\Executor;
1313

1414
use PHPUnit\Framework\TestCase;
15+
use Prophecy\PhpUnit\ProphecyTrait;
1516
use Symfony\Component\Process\Process;
1617
use Task\Execution\TaskExecutionInterface;
1718
use Task\Executor\FailedException;
@@ -25,6 +26,8 @@
2526

2627
class SeparateProcessExecutorTest extends TestCase
2728
{
29+
use ProphecyTrait;
30+
2831
/**
2932
* @var TaskHandlerFactoryInterface
3033
*/

0 commit comments

Comments
 (0)