Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 6 additions & 14 deletions tests/Set/SetManager/SetManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public function testMatchComposerTriggered(): void
$setManager = $this->createSetManagerWithProjectDirectory(getcwd());

$twigComposerTriggeredSet = $setManager->matchComposerTriggered(SetGroup::TWIG);
$this->assertCount(8, $twigComposerTriggeredSet);
$this->assertCount(1, $twigComposerTriggeredSet);
}

/**
Expand All @@ -42,21 +42,13 @@ public function testByVersion(string $projectDirectory, array $expectedSets): vo
*/
public static function provideInstalledTwigData(): Iterator
{
// here we cannot used features coming up in 2.4, as we only have 2.0
yield [
__DIR__ . '/Fixture/project-twig-20',
[realpath(TwigSetList::COMPOSER_BASED), realpath(TwigSetList::TWIG_20)],
];
// the composer-based set covers every Twig version, as each rule inside it is bound
// to the exact twig/twig version it needs
yield [__DIR__ . '/Fixture/project-twig-20', [realpath(TwigSetList::COMPOSER_BASED)]];

yield [
__DIR__ . '/Fixture/project-twig-24',
[realpath(TwigSetList::COMPOSER_BASED), realpath(TwigSetList::TWIG_20), realpath(TwigSetList::TWIG_24)],
];
yield [__DIR__ . '/Fixture/project-twig-24', [realpath(TwigSetList::COMPOSER_BASED)]];

yield [
__DIR__ . '/Fixture/project-twig-127',
[realpath(TwigSetList::COMPOSER_BASED), realpath(TwigSetList::TWIG_112), realpath(TwigSetList::TWIG_127)],
];
yield [__DIR__ . '/Fixture/project-twig-127', [realpath(TwigSetList::COMPOSER_BASED)]];
}

private function createSetManagerWithProjectDirectory(string $projectDirectory): SetManager
Expand Down
Loading