File tree Expand file tree Collapse file tree 4 files changed +13
-12
lines changed Expand file tree Collapse file tree 4 files changed +13
-12
lines changed Original file line number Diff line number Diff line change 1919 "doctrine/orm" : " ^2.5"
2020 },
2121 "require-dev" : {
22- "phpunit/phpunit" : " ^4.8" ,
22+ "phpunit/phpunit" : " ^4.8 || ^5.7 " ,
2323 "symfony/framework-bundle" : " ^2.6" ,
2424 "symfony/finder" : " ^2.6" ,
2525 "doctrine/doctrine-bundle" : " ^1.5" ,
Original file line number Diff line number Diff line change 1212namespace Task \TaskBundle \Tests \Functional \Handler ;
1313
1414use Symfony \Bundle \FrameworkBundle \Test \KernelTestCase ;
15- use Task \Handler \TaskHandlerNotExistsException ;
1615use Task \TaskBundle \Handler \TaskHandlerFactory ;
1716use Task \TaskBundle \Tests \Functional \TestHandler ;
1817
@@ -39,10 +38,11 @@ public function testCreate()
3938 $ this ->assertInstanceOf (TestHandler::class, $ this ->taskHandlerFactory ->create (TestHandler::class));
4039 }
4140
41+ /**
42+ * @expectedException \Task\Handler\TaskHandlerNotExistsException
43+ */
4244 public function testCreateNotExists ()
4345 {
44- $ this ->setExpectedException (TaskHandlerNotExistsException::class);
45-
4646 $ this ->taskHandlerFactory ->create (\stdClass::class);
4747 }
4848}
Original file line number Diff line number Diff line change 33namespace Task \TaskBundle \Unit \Builder ;
44
55use Task \Scheduler \TaskSchedulerInterface ;
6- use Task \TaskBundle \Builder \NotSupportedMethodException ;
76use Task \TaskBundle \Builder \TaskBuilder ;
87use Task \TaskBundle \Entity \Task ;
98use Task \TaskInterface ;
@@ -21,10 +20,11 @@ public function testSetSystemKey()
2120 $ task ->setSystemKey ('test ' )->shouldBeCalled ();
2221 }
2322
23+ /**
24+ * @expectedException \Task\TaskBundle\Builder\NotSupportedMethodException
25+ */
2426 public function testSetSystemKeyNotSupported ()
2527 {
26- $ this ->setExpectedException (NotSupportedMethodException::class);
27-
2828 $ task = $ this ->prophesize (TaskInterface::class);
2929 $ scheduler = $ this ->prophesize (TaskSchedulerInterface::class);
3030
Original file line number Diff line number Diff line change 1111
1212namespace Task \TaskBundle \Tests \Unit \Handler ;
1313
14- use Task \Handler \TaskHandlerNotExistsException ;
1514use Task \TaskBundle \Handler \TaskHandlerFactory ;
1615use Task \TaskBundle \Tests \Functional \TestHandler ;
1716
@@ -28,19 +27,21 @@ public function testCreate()
2827 $ this ->assertEquals ($ handler , $ taskHandlerFactory ->create (TestHandler::class));
2928 }
3029
30+ /**
31+ * @expectedException \Task\Handler\TaskHandlerNotExistsException
32+ */
3133 public function testCreateNotExists ()
3234 {
33- $ this ->setExpectedException (TaskHandlerNotExistsException::class);
34-
3535 $ taskHandlerFactory = new TaskHandlerFactory ([TestHandler::class => new TestHandler ()]);
3636
3737 $ taskHandlerFactory ->create (\stdClass::class);
3838 }
3939
40+ /**
41+ * @expectedException \Task\Handler\TaskHandlerNotExistsException
42+ */
4043 public function testCreateNoHandler ()
4144 {
42- $ this ->setExpectedException (TaskHandlerNotExistsException::class);
43-
4445 $ taskHandlerFactory = new TaskHandlerFactory ([]);
4546
4647 $ taskHandlerFactory ->create (\stdClass::class);
You can’t perform that action at this time.
0 commit comments