Skip to content

Commit cacbf11

Browse files
authored
Merge pull request #73 from OStefan2001/1.0-olaru-phpunit
Issue #72: Bump phpunit to v12.5.23
2 parents 22c49aa + 9062dbc commit cacbf11

6 files changed

Lines changed: 12 additions & 13 deletions

File tree

‎.github/workflows/codecov.yml‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ jobs:
1515
- ubuntu-latest
1616

1717
php:
18-
- "8.2"
1918
- "8.3"
2019
- "8.4"
2120
- "8.5"

‎.github/workflows/static-analysis.yml‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ jobs:
1515
- ubuntu-latest
1616

1717
php:
18-
- "8.2"
1918
- "8.3"
2019
- "8.4"
2120
- "8.5"

‎composer.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
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",
@@ -40,7 +40,7 @@
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"

‎phpunit.xml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
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">

‎test/Unit/Page/Handler/PageHandlerTest.php‎

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff 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);

‎test/Unit/Page/RoutesDelegatorTest.php‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff 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,

0 commit comments

Comments
 (0)