File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1515 - ubuntu-latest
1616
1717 php :
18- - " 8.2"
1918 - " 8.3"
2019 - " 8.4"
2120 - " 8.5"
Original file line number Diff line number Diff line change 1515 - ubuntu-latest
1616
1717 php :
18- - " 8.2"
1918 - " 8.3"
2019 - " 8.4"
2120 - " 8.5"
Original file line number Diff line number Diff line change 2626 }
2727 },
2828 "require" : {
29- "php" : " ~8.2.0 || ~8. 3.0 || ~8.4.0 || ~8.5.0" ,
29+ "php" : " ~8.3.0 || ~8.4.0 || ~8.5.0" ,
3030 "dotkernel/dot-errorhandler" : " ^4.4.0" ,
3131 "laminas/laminas-component-installer" : " ^3.5.0" ,
3232 "laminas/laminas-config-aggregator" : " ^1.17.0" ,
4040 "laminas/laminas-development-mode" : " ^3.13.0" ,
4141 "phpstan/phpstan" : " ^2.1.2" ,
4242 "phpstan/phpstan-phpunit" : " ^2.0.4" ,
43- "phpunit/phpunit" : " ^10 .5.45 " ,
43+ "phpunit/phpunit" : " ^12 .5.23 " ,
4444 "roave/security-advisories" : " dev-master" ,
4545 "symfony/var-dumper" : " ^7.2.3" ,
4646 "vincentlanglet/twig-cs-fixer" : " ^3.5.1"
Original file line number Diff line number Diff line change 33 xsi : noNamespaceSchemaLocation =" vendor/phpunit/phpunit/phpunit.xsd"
44 bootstrap =" vendor/autoload.php"
55 colors =" true"
6+ displayDetailsOnPhpunitNotices =" true"
7+ displayDetailsOnTestsThatTriggerDeprecations =" true"
8+ displayDetailsOnPhpunitDeprecations =" true"
69 stopOnError =" true" >
710 <testsuites >
811 <testsuite name =" UnitTests" >
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ class PageHandlerTest extends TestCase
2020 */
2121 public function testWillInstantiate (): void
2222 {
23- $ handler = $ this ->createMock (GetPageViewHandler::class);
23+ $ handler = $ this ->createStub (GetPageViewHandler::class);
2424
2525 $ this ->assertContainsOnlyInstancesOf (RequestHandlerInterface::class, [$ handler ]);
2626 }
@@ -31,22 +31,20 @@ public function testWillInstantiate(): void
3131 public function testHandle (): void
3232 {
3333 $ routeName = 'test_route_name ' ;
34- $ request = $ this ->createMock (ServerRequestInterface::class);
35- $ template = $ this ->createMock (TemplateRendererInterface::class);
36- $ routeResult = $ this ->createMock (RouteResult::class);
34+ $ request = $ this ->createStub (ServerRequestInterface::class);
35+ $ template = $ this ->createStub (TemplateRendererInterface::class);
36+ $ routeResult = $ this ->createStub (RouteResult::class);
3737
3838 $ routeResult
3939 ->method ('getMatchedRouteName ' )
4040 ->willReturn ($ routeName );
4141
4242 $ request
4343 ->method ('getAttribute ' )
44- ->with (RouteResult::class)
4544 ->willReturn ($ routeResult );
4645
4746 $ template
4847 ->method ('render ' )
49- ->with ($ routeName )
5048 ->willReturn ('<p> ' . $ routeName . '</p> ' );
5149
5250 $ handler = new GetPageViewHandler ($ template );
Original file line number Diff line number Diff line change @@ -30,10 +30,10 @@ public function testWillInvoke(): void
3030 $ routeUri = sprintf ('/%s/%s ' , $ moduleName , $ routeName );
3131 $ templateName = sprintf ('%s::%s ' , $ moduleName , $ routeName );
3232
33- $ container = $ this ->createMock (ContainerInterface::class);
33+ $ container = $ this ->createStub (ContainerInterface::class);
3434 $ app = $ this ->createMock (Application::class);
3535
36- $ app ->method ('get ' )->willReturn ($ this ->createMock (Route::class));
36+ $ app ->method ('get ' )->willReturn ($ this ->createStub (Route::class));
3737 $ app
3838 ->expects ($ this ->exactly (1 ))
3939 ->method ('get ' )
@@ -43,7 +43,7 @@ public function testWillInvoke(): void
4343 $ this ->assertSame ($ templateName , $ args [2 ]);
4444 });
4545
46- $ container ->method ('get ' )->with ( ' config ' )-> willReturn ([
46+ $ container ->method ('get ' )->willReturn ([
4747 'routes ' => [
4848 $ moduleName => [
4949 $ routeName => $ routeName ,
You can’t perform that action at this time.
0 commit comments