Skip to content

Commit d007bbd

Browse files
committed
minor symfony#25907 Improve assertions (carusogabriel)
This PR was merged into the 2.7 branch. Discussion ---------- Improve assertions | Q | A | ------------- | --- | Branch? | 2.7 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - Following symfony#25420 before start other branches. Btw, the other branches are 2.8, 3.3, 3.4, 4.0 and master? Commits ------- 3d90a22 Improve assertions
2 parents 5e3aa67 + 3d90a22 commit d007bbd

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/Symfony/Component/Finder/Tests/FinderTest.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
namespace Symfony\Component\Finder\Tests;
1313

1414
use Symfony\Component\Finder\Adapter\AdapterInterface;
15-
use Symfony\Component\Finder\Adapter\GnuFindAdapter;
1615
use Symfony\Component\Finder\Adapter\PhpAdapter;
1716
use Symfony\Component\Finder\Finder;
1817

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

615614
// test another adapter selection
616615
$adapters = Finder::create()->setAdapter('gnu_find')->getAdapters();
617-
$this->assertTrue($adapters[0] instanceof GnuFindAdapter);
616+
$this->assertInstanceOf('Symfony\Component\Finder\Adapter\GnuFindAdapter', $adapters[0]);
618617

619618
// test that useBestAdapter method removes selection
620619
$adapters = Finder::create()->useBestAdapter()->getAdapters();
621-
$this->assertFalse($adapters[0] instanceof PhpAdapter);
620+
$this->assertNotInstanceOf('Symfony\Component\Finder\Adapter\PhpAdapter', $adapters[0]);
622621
}
623622

624623
public function getTestPathData()

0 commit comments

Comments
 (0)