Skip to content

Commit

Permalink
chore: run tests also against phpunit 11
Browse files Browse the repository at this point in the history
Additionally, avoid deprecations.
  • Loading branch information
brotkrueml committed Aug 18, 2024
1 parent edb5466 commit 657907a
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ public static function fluidTemplatesProvider(): iterable
<schema:multipleType types="ProductStub,ServiceStub" properties="{name: '{item}'}"/>
</f:for>',
EOF,
'{"@context":"https://schema.org/","@graph":[{"@type":["ProductStub","ServiceStub"],"name":"foo"},{"@type":["ProductStub","ServiceStub"],"name":"bar"},{"@type":["ProductStub","ServiceStub"],"name":"qux"}]}',
'expected' => '{"@context":"https://schema.org/","@graph":[{"@type":["ProductStub","ServiceStub"],"name":"foo"},{"@type":["ProductStub","ServiceStub"],"name":"bar"},{"@type":["ProductStub","ServiceStub"],"name":"qux"}]}',
];
}

Expand Down
4 changes: 2 additions & 2 deletions Tests/Unit/Core/Model/AbstractTypeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ public function cacheForAdditionalPropertiesReturnsPropertiesAndTheseAreAddedSor
#[Test]
public function cacheForAdditionalPropertiesReturnsFalseAndDispatcherIsCalled(): void
{
$cacheFrontendMock = $this->createStub(FrontendInterface::class);
$cacheFrontendMock = $this->createMock(FrontendInterface::class);
$cacheFrontendMock
->expects(self::once())
->method('get')
Expand Down Expand Up @@ -484,7 +484,7 @@ public function cacheForAdditionalPropertiesReturnsFalseAndDispatcherIsCalled():
#[Test]
public function cacheForAdditionalPropertiesReturnsFalseAndEventDispatcherIsCalled(): void
{
$cacheFrontendMock = $this->createStub(FrontendInterface::class);
$cacheFrontendMock = $this->createMock(FrontendInterface::class);
$cacheFrontendMock
->expects(self::once())
->method('get')
Expand Down
4 changes: 1 addition & 3 deletions Tests/Unit/UserFunctions/FormEngine/WebPageTypesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,7 @@ public function getAddsWebPageTypesToItemsArray(): void
], $params['items'][1]);
}

/**
* @@test
*/
#[Test]
public function getDoesNotAddWebPageTypesWhenNoWebPageTypesAreAvailable(): void
{
$subject = new WebPageTypes(new TypeProvider());
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"php-coveralls/php-coveralls": "^2.7",
"phpstan/extension-installer": "^1.4",
"phpstan/phpstan": "1.11.9",
"phpunit/phpunit": "^10.5",
"phpunit/phpunit": "^10.5 || ^11.3",
"rector/rector": "1.2.2",
"symfony/yaml": "^5.4 || ^6.4 || ^7.0",
"symplify/phpstan-rules": "^13.0",
Expand Down

0 comments on commit 657907a

Please sign in to comment.