fix: ignore line endings in scaffolder output assertions

This commit is contained in:
dualfroz committed 2026-10-03 01:50:30 +02:00
1 parent 362e25d279
commit 816d6d3cd4
2 files changed
+53 -2

No files matched your search

+43
View File
@@ -92,6 +92,49 @@ PHP,
);
}
public function testCommandSameOutputStringsIgnoreLineEndings(): void
{
$this->assertScaffolderCommandSame(
'create:filter',
[
'name' => 'Test',
],
expected: <<<'PHP'
<?php
declare(strict_types=1);
namespace Spiral\Testing\Filter;
use Spiral\Filters\Model\Filter;
final class TestFilter extends Filter
{
}
PHP,
expectedOutputStrings: [
"Next steps:\r\n1. Read more about Filter Objects in the documentation",
],
);
}
public function testCommandContainsOutputStringsIgnoreLineEndings(): void
{
$this->assertScaffolderCommandContains(
'create:filter',
[
'name' => 'Test',
],
expectedStrings: [
'final class TestFilter extends Filter',
],
expectedOutputStrings: [
"Next steps:\r\n1. Read more about Filter Objects in the documentation",
],
);
}
public function testAfterTestFilesShoulBeRestored(): void
{
$files = $this->mockContainer(FilesInterface::class);