Commit 95f41cc
committed
fix dumping tests to skip with data providers
Without the fix running `SYMFONY_PHPUNIT_SKIPPED_TESTS='phpunit.skipped' php
./phpunit src/Symfony/Component/Lock/Tests/Store/DoctrineDbalPostgreSqlStoreTest.php`
without the pdo_pgsql extension enabled the generated skip file looked like this:
```
<?php return array (
'PHPUnit\\Framework\\DataProviderTestSuite' =>
array (
'Symfony\\Component\\Lock\\Tests\\Store\\DoctrineDbalPostgreSqlStoreTest::testInvalidDriver' => 1,
),
'Symfony\\Component\\Lock\\Tests\\Store\\DoctrineDbalPostgreSqlStoreTest' =>
array (
'testSaveAfterConflict' => 1,
'testWaitAndSaveAfterConflictReleasesLockFromInternalStore' => 1,
'testWaitAndSaveReadAfterConflictReleasesLockFromInternalStore' => 1,
'testSave' => 1,
'testSaveWithDifferentResources' => 1,
'testSaveWithDifferentKeysOnSameResources' => 1,
'testSaveTwice' => 1,
'testDeleteIsolated' => 1,
'testBlockingLocks' => 1,
'testSharedLockReadFirst' => 1,
'testSharedLockWriteFirst' => 1,
'testSharedLockPromote' => 1,
'testSharedLockPromoteAllowed' => 1,
'testSharedLockDemote' => 1,
),
);
```
Thus, running the tests again with the extension enabled would only run 14
tests instead of the expected total number of 16 tests.
With the patch applied the generated skip file looks like this:
```
<?php return array (
'Symfony\\Component\\Lock\\Tests\\Store\\DoctrineDbalPostgreSqlStoreTest' =>
array (
'testInvalidDriver with data set #0' => 1,
'testInvalidDriver with data set symfony#1' => 1,
'testSaveAfterConflict' => 1,
'testWaitAndSaveAfterConflictReleasesLockFromInternalStore' => 1,
'testWaitAndSaveReadAfterConflictReleasesLockFromInternalStore' => 1,
'testSave' => 1,
'testSaveWithDifferentResources' => 1,
'testSaveWithDifferentKeysOnSameResources' => 1,
'testSaveTwice' => 1,
'testDeleteIsolated' => 1,
'testBlockingLocks' => 1,
'testSharedLockReadFirst' => 1,
'testSharedLockWriteFirst' => 1,
'testSharedLockPromote' => 1,
'testSharedLockPromoteAllowed' => 1,
'testSharedLockDemote' => 1,
),
);
```1 parent da4eb8b commit 95f41cc
File tree
1 file changed
+8
-1
lines changed- src/Symfony/Bridge/PhpUnit/Legacy
1 file changed
+8
-1
lines changedLines changed: 8 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| |||
196 | 197 | | |
197 | 198 | | |
198 | 199 | | |
199 | | - | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
200 | 207 | | |
201 | 208 | | |
202 | 209 | | |
| |||
0 commit comments