Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion .github/workflows/unit-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
echo COLUMNS=120 >> $GITHUB_ENV
echo COMPOSER_MIN_STAB='composer config minimum-stability ${{ matrix.minimum-stability || 'stable' }} --ansi' >> $GITHUB_ENV
echo COMPOSER_UP='composer update ${{ matrix.dependency-version == 'lowest' && '--prefer-lowest' || '' }} --no-progress --no-interaction --ansi' >> $GITHUB_ENV
echo PHPUNIT='vendor/bin/simple-phpunit' >> $GITHUB_ENV
echo PHPUNIT='vendor/bin/simple-phpunit ${{ matrix.os == 'windows-latest' && '--exclude-group transient-on-windows' || '' }}' >> $GITHUB_ENV
[ 'lowest' = '${{ matrix.dependency-version }}' ] && export SYMFONY_DEPRECATIONS_HELPER=weak

# Swup and Typed have no tests, Turbo has its own workflow file
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@ public function testCanRenderComponentAsHtmlWithAlternateRoute()
;
}

/**
* @group transient-on-windows
*/
public function testCanExecuteComponentActionNormalRoute()
{
$templateName = 'render_embedded_with_blocks.html.twig';
Expand Down Expand Up @@ -189,6 +192,9 @@ public function testPreReRenderHookOnlyExecutedDuringAjax()
;
}

/**
* @group transient-on-windows
*/
public function testItAddsEmbeddedTemplateContextToEmbeddedComponents()
{
$templateName = 'render_embedded_with_blocks.html.twig';
Expand Down Expand Up @@ -226,6 +232,9 @@ public function testItAddsEmbeddedTemplateContextToEmbeddedComponents()
;
}

/**
* @group transient-on-windows
*/
public function testItWorksWithNamespacedTemplateNamesForEmbeddedComponents()
{
$templateName = 'render_embedded_with_blocks.html.twig';
Expand All @@ -239,6 +248,9 @@ public function testItWorksWithNamespacedTemplateNamesForEmbeddedComponents()
;
}

/**
* @group transient-on-windows
*/
public function testItUseBlocksFromEmbeddedContextUsingMultipleComponents()
{
$templateName = 'render_multiple_embedded_with_blocks.html.twig';
Expand Down Expand Up @@ -271,6 +283,9 @@ public function testItUseBlocksFromEmbeddedContextUsingMultipleComponents()
;
}

/**
* @group transient-on-windows
*/
public function testItUseBlocksFromEmbeddedContextUsingMultipleComponentsWithNamespacedTemplate()
{
$templateName = 'render_multiple_embedded_with_blocks.html.twig';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ private function executeHydrationTestCase(callable $testFactory, ?int $minPhpVer
}

/**
* @group transient-on-windows
* @dataProvider provideDehydrationHydrationTests
*/
public function testCanDehydrateAndHydrateComponentWithTestCases(callable $testFactory, ?int $minPhpVersion = null)
Expand Down
2 changes: 1 addition & 1 deletion src/Toolkit/src/Kit/KitContextRunner.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public function findAnonymousComponentTemplate(string $name): ?string
{
foreach ($this->kit->getRecipes(type: RecipeType::Component) as $recipe) {
foreach ($recipe->getFiles() as $file) {
if (str_ends_with($file->sourceRelativePathName, str_replace(':', \DIRECTORY_SEPARATOR, $name).'.html.twig')) {
if (str_ends_with($file->sourceRelativePathName, str_replace(':', '/', $name).'.html.twig')) {
return $file->sourceRelativePathName;
}
}
Expand Down
17 changes: 9 additions & 8 deletions src/Toolkit/tests/Command/InstallCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
use Symfony\Component\Filesystem\Filesystem;
use Symfony\Component\Filesystem\Path;
use Zenstruck\Console\Test\InteractsWithConsole;

class InstallCommandTest extends KernelTestCase
Expand All @@ -36,14 +37,14 @@ protected function setUp(): void
public function testShouldAbleToInstallComponentTableAndItsDependencies()
{
$expectedFiles = [
'Table/templates/components/Table.html.twig' => $this->tmpDir.'/templates/components/Table.html.twig',
'Table/templates/components/Table/Body.html.twig' => $this->tmpDir.'/templates/components/Table/Body.html.twig',
'Table/templates/components/Table/Caption.html.twig' => $this->tmpDir.'/templates/components/Table/Caption.html.twig',
'Table/templates/components/Table/Cell.html.twig' => $this->tmpDir.'/templates/components/Table/Cell.html.twig',
'Table/templates/components/Table/Footer.html.twig' => $this->tmpDir.'/templates/components/Table/Footer.html.twig',
'Table/templates/components/Table/Head.html.twig' => $this->tmpDir.'/templates/components/Table/Head.html.twig',
'Table/templates/components/Table/Header.html.twig' => $this->tmpDir.'/templates/components/Table/Header.html.twig',
'Table/templates/components/Table/Row.html.twig' => $this->tmpDir.'/templates/components/Table/Row.html.twig',
'Table/templates/components/Table.html.twig' => Path::normalize($this->tmpDir.'/templates/components/Table.html.twig'),
'Table/templates/components/Table/Body.html.twig' => Path::normalize($this->tmpDir.'/templates/components/Table/Body.html.twig'),
'Table/templates/components/Table/Caption.html.twig' => Path::normalize($this->tmpDir.'/templates/components/Table/Caption.html.twig'),
'Table/templates/components/Table/Cell.html.twig' => Path::normalize($this->tmpDir.'/templates/components/Table/Cell.html.twig'),
'Table/templates/components/Table/Footer.html.twig' => Path::normalize($this->tmpDir.'/templates/components/Table/Footer.html.twig'),
'Table/templates/components/Table/Head.html.twig' => Path::normalize($this->tmpDir.'/templates/components/Table/Head.html.twig'),
'Table/templates/components/Table/Header.html.twig' => Path::normalize($this->tmpDir.'/templates/components/Table/Header.html.twig'),
'Table/templates/components/Table/Row.html.twig' => Path::normalize($this->tmpDir.'/templates/components/Table/Row.html.twig'),
];

foreach ($expectedFiles as $expectedFile) {
Expand Down
Loading