Skip to content

Commit

Permalink
Fix tests for PHP 7.1
Browse files Browse the repository at this point in the history
  • Loading branch information
antograssiot committed Nov 28, 2020
1 parent 63cead2 commit 2423cb8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/Bridge/Symfony/Maker/MakeDataProviderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public function getItem(string $resourceClass, $id, string $operationName = null
yield 'Generate all without resource class' => [
[],
['CustomDataProvider', ''],
$expected,
\PHP_VERSION_ID >= 70200 ? $expected : str_replace(': object', '', $expected),
];

$expected = <<<'EOF'
Expand Down Expand Up @@ -176,7 +176,7 @@ public function getItem(string $resourceClass, $id, string $operationName = null
yield 'Generate an item data provider without resource class' => [
['--item-only' => true],
['CustomDataProvider', ''],
$expected,
\PHP_VERSION_ID >= 70200 ? $expected : str_replace(': object', '', $expected),
];

$expected = <<<'EOF'
Expand Down Expand Up @@ -274,6 +274,7 @@ public function getCollection(string $resourceClass, string $operationName = nul
}

EOF;

yield 'Generate a collection data provider with a resource class' => [
['--collection-only' => true],
['CustomDataProvider', Dummy::class],
Expand Down

0 comments on commit 2423cb8

Please sign in to comment.