Skip to content

Commit

Permalink
Improve assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
carusogabriel committed Jan 24, 2018
1 parent 1b92f06 commit 3d90a22
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/Symfony/Component/Finder/Tests/FinderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
namespace Symfony\Component\Finder\Tests;

use Symfony\Component\Finder\Adapter\AdapterInterface;
use Symfony\Component\Finder\Adapter\GnuFindAdapter;
use Symfony\Component\Finder\Adapter\PhpAdapter;
use Symfony\Component\Finder\Finder;

Expand Down Expand Up @@ -610,15 +609,15 @@ public function testAdapterSelection()
{
// test that by default, PhpAdapter is selected
$adapters = Finder::create()->getAdapters();
$this->assertTrue($adapters[0] instanceof PhpAdapter);
$this->assertInstanceOf('Symfony\Component\Finder\Adapter\PhpAdapter', $adapters[0]);

// test another adapter selection
$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
$adapters = Finder::create()->useBestAdapter()->getAdapters();
$this->assertFalse($adapters[0] instanceof PhpAdapter);
$this->assertNotInstanceOf('Symfony\Component\Finder\Adapter\PhpAdapter', $adapters[0]);
}

public function getTestPathData()
Expand Down

0 comments on commit 3d90a22

Please sign in to comment.