8000 Improve the structure of the Finder testsuite · symfony/symfony@97fbe90 · GitHub
[go: up one dir, main page]

Skip to content

Commit 97fbe90

Browse files
committed
Improve the structure of the Finder testsuite
Testing against different adapters is now handled by multiple subclasses of a common test case rather than using data providers. This allows tests to be marked as skipped for unsupported adapters instead of making them disappear from the testsuite.
1 parent 150bcc9 commit 97fbe90

File tree

4 files changed

+231
-297
lines changed

4 files changed

+231
-297
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?php
2+
3+
/*
4+
* This file is part of the Symfony package.
5+
*
6+
* (c) Fabien Potencier <fabien@symfony.com>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
12+
namespace Symfony\Component\Finder\Tests;
13+
14+
use Symfony\Component\Finder\Adapter\BsdFindAdapter;
15+
16+
class BsdFinderTest extends FinderTest
17+
{
18+
protected function getAdapter()
19+
{
20+
$adapter = new BsdFindAdapter();
21+
22+
if (!$adapter->isSupported()) {
23+
$this->markTestSkipped(get_class($adapter).' is not supported.');
24+
}
25+
26+
return $adapter;
27+
}
28+
}

0 commit comments

Comments
 (0)
0