Skip to content

Commit

Permalink
improve assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
raffaelecarelle committed Sep 24, 2024
1 parent caba345 commit 11e8581
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion tests/Functional/Filter/ExcludeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
namespace Tests\Functional\Filter;

use Paraunit\Filter\Filter;
use Symfony\Component\Filesystem\Path;
use Tests\BaseFunctionalTestCase;

class ExcludeTest extends BaseFunctionalTestCase
Expand All @@ -22,6 +23,18 @@ public function testExcludeTestSuites(): void
/** @var Filter $filter */
$filter = $this->getService(Filter::class);

$this->assertCount(1, $filter->filterTestFiles());
$files = $filter->filterTestFiles();

$this->assertCount(1, $files);

$files = array_map(function (string $file): string {
return Path::makeRelative($file, dirname(__DIR__));
}, $files);

// Test in suite1 is in array
$this->assertTrue(in_array('../Stub/ThreeGreenTestStub.php', $files));

// Test in suite2 doesn't
$this->assertFalse(in_array('../Stub/EntityManagerClosedTestStub.php', $files));
}
}

0 comments on commit 11e8581

Please sign in to comment.