File tree Expand file tree Collapse file tree 10 files changed +26
-5
lines changed Expand file tree Collapse file tree 10 files changed +26
-5
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ abstract class BaseDatabaseTestCase extends KernelTestCase
22
22
/**
23
23
* {@inheritdoc}
24
24
*/
25
- public function setUp ()
25
+ protected function setUp (): void
26
26
{
27
27
self ::bootKernel ();
28
28
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ protected function setUp(): void
11
11
{
12
12
self ::bootKernel ();
13
13
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. ' );
15
15
}
16
16
17
17
parent ::setUp ();
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ protected function setUp(): void
22
22
public function testFindBySystemKey ()
23
23
{
24
24
if ('doctrine ' !== self ::$ kernel ->getContainer ()->getParameter ('kernel.storage ' )) {
25
- return $ this ->markTestSkipped ('This testcase will only be called for doctrine storage. ' );
25
+ $ this ->markTestSkipped ('This testcase will only be called for doctrine storage. ' );
26
26
}
27
27
28
28
$ task = $ this ->createTask ();
@@ -37,7 +37,7 @@ public function testFindBySystemKey()
37
37
public function testFindBySystemKeyNotFound ()
38
38
{
39
39
if ('doctrine ' !== self ::$ kernel ->getContainer ()->getParameter ('kernel.storage ' )) {
40
- return $ this ->markTestSkipped ('This testcase will only be called for doctrine storage. ' );
40
+ $ this ->markTestSkipped ('This testcase will only be called for doctrine storage. ' );
41
41
}
42
42
43
43
$ task = $ this ->createTask ();
@@ -49,7 +49,7 @@ public function testFindBySystemKeyNotFound()
49
49
public function testFindSystemTasks ()
50
50
{
51
51
if ('doctrine ' !== self ::$ kernel ->getContainer ()->getParameter ('kernel.storage ' )) {
52
- return $ this ->markTestSkipped ('This testcase will only be called for doctrine storage. ' );
52
+ $ this ->markTestSkipped ('This testcase will only be called for doctrine storage. ' );
53
53
}
54
54
55
55
$ task1 = $ this ->createTask ();
Original file line number Diff line number Diff line change 3
3
namespace Unit \Builder ;
4
4
5
5
use PHPUnit \Framework \TestCase ;
6
+ use Prophecy \PhpUnit \ProphecyTrait ;
6
7
use Task \Scheduler \TaskSchedulerInterface ;
7
8
use Task \TaskBundle \Builder \TaskBuilder ;
8
9
use Task \TaskBundle \Builder \TaskBuilderFactory ;
9
10
use Task \TaskInterface ;
10
11
11
12
class TaskBuilderFactoryTest extends TestCase
12
13
{
14
+ use ProphecyTrait;
15
+
13
16
public function testCreate ()
14
17
{
15
18
$ task = $ this ->prophesize (TaskInterface::class);
Original file line number Diff line number Diff line change 3
3
namespace Task \TaskBundle \Unit \Builder ;
4
4
5
5
use PHPUnit \Framework \TestCase ;
6
+ use Prophecy \PhpUnit \ProphecyTrait ;
6
7
use Task \Scheduler \TaskSchedulerInterface ;
7
8
use Task \TaskBundle \Builder \NotSupportedMethodException ;
8
9
use Task \TaskBundle \Builder \TaskBuilder ;
11
12
12
13
class TaskBuilderTest extends TestCase
13
14
{
15
+ use ProphecyTrait;
16
+
14
17
public function testSetSystemKey ()
15
18
{
16
19
$ task = $ this ->prophesize (Task::class);
Original file line number Diff line number Diff line change 5
5
use Cron \CronExpression ;
6
6
use PHPUnit \Framework \TestCase ;
7
7
use Prophecy \Argument ;
8
+ use Prophecy \PhpUnit \ProphecyTrait ;
8
9
use Symfony \Component \Console \Input \StringInput ;
9
10
use Symfony \Component \Console \Output \OutputInterface ;
10
11
use Task \Execution \TaskExecutionInterface ;
19
20
20
21
class ScheduleSystemTasksCommandTest extends TestCase
21
22
{
23
+ use ProphecyTrait;
24
+
22
25
/**
23
26
* @var TaskSchedulerInterface
24
27
*/
Original file line number Diff line number Diff line change 12
12
namespace Task \TaskBundle \Unit \DependencyInjection ;
13
13
14
14
use PHPUnit \Framework \TestCase ;
15
+ use Prophecy \PhpUnit \ProphecyTrait ;
15
16
use Symfony \Component \DependencyInjection \ContainerBuilder ;
16
17
use Symfony \Component \DependencyInjection \Definition ;
17
18
use Symfony \Component \DependencyInjection \Reference ;
22
23
*/
23
24
class HandlerCompilerPassTest extends TestCase
24
25
{
26
+ use ProphecyTrait;
27
+
25
28
public function testProcess ()
26
29
{
27
30
$ container = $ this ->prophesize (ContainerBuilder::class);
Original file line number Diff line number Diff line change 12
12
namespace Task \TaskBundle \Tests \Unit \EventListener ;
13
13
14
14
use PHPUnit \Framework \TestCase ;
15
+ use Prophecy \PhpUnit \ProphecyTrait ;
15
16
use Symfony \Component \EventDispatcher \Event as LegacyEvent ;
16
17
use Symfony \Contracts \EventDispatcher \Event ;
17
18
use Task \Runner \TaskRunnerInterface ;
22
23
*/
23
24
class RunListenerTest extends TestCase
24
25
{
26
+ use ProphecyTrait;
27
+
25
28
public function testRun ()
26
29
{
27
30
if (\class_exists (LegacyEvent::class)) {
Original file line number Diff line number Diff line change 13
13
14
14
use Doctrine \ORM \EntityManagerInterface ;
15
15
use PHPUnit \Framework \TestCase ;
16
+ use Prophecy \PhpUnit \ProphecyTrait ;
16
17
use Task \Event \TaskExecutionEvent ;
17
18
use Task \TaskBundle \EventListener \DoctrineTaskExecutionListener ;
18
19
21
22
*/
22
23
class TaskExecutionListenerTest extends TestCase
23
24
{
25
+ use ProphecyTrait;
26
+
24
27
public function testClearEntityManagerAfterTask ()
25
28
{
26
29
$ entityManager = $ this ->prophesize (EntityManagerInterface::class);
Original file line number Diff line number Diff line change 12
12
namespace Task \TaskBundle \Tests \Unit \Executor ;
13
13
14
14
use PHPUnit \Framework \TestCase ;
15
+ use Prophecy \PhpUnit \ProphecyTrait ;
15
16
use Symfony \Component \Process \Process ;
16
17
use Task \Execution \TaskExecutionInterface ;
17
18
use Task \Executor \FailedException ;
25
26
26
27
class SeparateProcessExecutorTest extends TestCase
27
28
{
29
+ use ProphecyTrait;
30
+
28
31
/**
29
32
* @var TaskHandlerFactoryInterface
30
33
*/
You can’t perform that action at this time.
0 commit comments