Improve assertions
This commit is contained in:
parent
1b92f0685d
commit
3d90a2217d
@ -12,7 +12,6 @@
|
|||||||
namespace Symfony\Component\Finder\Tests;
|
namespace Symfony\Component\Finder\Tests;
|
||||||
|
|
||||||
use Symfony\Component\Finder\Adapter\AdapterInterface;
|
use Symfony\Component\Finder\Adapter\AdapterInterface;
|
||||||
use Symfony\Component\Finder\Adapter\GnuFindAdapter;
|
|
||||||
use Symfony\Component\Finder\Adapter\PhpAdapter;
|
use Symfony\Component\Finder\Adapter\PhpAdapter;
|
||||||
use Symfony\Component\Finder\Finder;
|
use Symfony\Component\Finder\Finder;
|
||||||
|
|
||||||
@ -610,15 +609,15 @@ class FinderTest extends Iterator\RealIteratorTestCase
|
|||||||
{
|
{
|
||||||
// test that by default, PhpAdapter is selected
|
// test that by default, PhpAdapter is selected
|
||||||
$adapters = Finder::create()->getAdapters();
|
$adapters = Finder::create()->getAdapters();
|
||||||
$this->assertTrue($adapters[0] instanceof PhpAdapter);
|
$this->assertInstanceOf('Symfony\Component\Finder\Adapter\PhpAdapter', $adapters[0]);
|
||||||
|
|
||||||
// test another adapter selection
|
// test another adapter selection
|
||||||
$adapters = Finder::create()->setAdapter('gnu_find')->getAdapters();
|
$adapters = Finder::create()->setAdapter('gnu_find')->getAdapters();
|
||||||
$this->assertTrue($adapters[0] instanceof GnuFindAdapter);
|
$this->assertInstanceOf('Symfony\Component\Finder\Adapter\GnuFindAdapter', $adapters[0]);
|
||||||
|
|
||||||
// test that useBestAdapter method removes selection
|
// test that useBestAdapter method removes selection
|
||||||
$adapters = Finder::create()->useBestAdapter()->getAdapters();
|
$adapters = Finder::create()->useBestAdapter()->getAdapters();
|
||||||
$this->assertFalse($adapters[0] instanceof PhpAdapter);
|
$this->assertNotInstanceOf('Symfony\Component\Finder\Adapter\PhpAdapter', $adapters[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getTestPathData()
|
public function getTestPathData()
|
||||||
|
Reference in New Issue
Block a user