repo
stringlengths
7
63
file_url
stringlengths
81
284
file_path
stringlengths
5
200
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 15:02:33
2026-01-05 05:24:06
truncated
bool
2 classes
Stillat/blade-parser
https://github.com/Stillat/blade-parser/blob/d6df786667543d31a0fd45d90c8b78042625c4b4/tests/Compiler/BladeElseAuthStatementsTest.php
tests/Compiler/BladeElseAuthStatementsTest.php
<?php uses(\Stillat\BladeParser\Tests\ParserTestCase::class); test('else auth statements are compiled', function () { $string = '@auth("api") breeze @elseauth("standard") wheeze @endauth'; $expected = '<?php if(auth()->guard("api")->check()): ?> breeze <?php elseif(auth()->guard("standard")->check()): ?> wheez...
php
MIT
d6df786667543d31a0fd45d90c8b78042625c4b4
2026-01-05T04:28:43.219923Z
false
Stillat/blade-parser
https://github.com/Stillat/blade-parser/blob/d6df786667543d31a0fd45d90c8b78042625c4b4/tests/Compiler/BladeShowTest.php
tests/Compiler/BladeShowTest.php
<?php uses(\Stillat\BladeParser\Tests\ParserTestCase::class); test('shows are compiled', function () { expect($this->compiler->compileString('@show'))->toBe('<?php echo $__env->yieldSection(); ?>'); });
php
MIT
d6df786667543d31a0fd45d90c8b78042625c4b4
2026-01-05T04:28:43.219923Z
false
Stillat/blade-parser
https://github.com/Stillat/blade-parser/blob/d6df786667543d31a0fd45d90c8b78042625c4b4/tests/Compiler/BladeContinueStatementsTest.php
tests/Compiler/BladeContinueStatementsTest.php
<?php uses(\Stillat\BladeParser\Tests\ParserTestCase::class); test('continue statements are compiled', function () { $string = '@for ($i = 0; $i < 10; $i++) test @continue @endfor'; $expected = '<?php for($i = 0; $i < 10; $i++): ?> test <?php continue; ?> <?php endfor; ?>'; expect($this->compiler->compileS...
php
MIT
d6df786667543d31a0fd45d90c8b78042625c4b4
2026-01-05T04:28:43.219923Z
false
Stillat/blade-parser
https://github.com/Stillat/blade-parser/blob/d6df786667543d31a0fd45d90c8b78042625c4b4/tests/Compiler/BladeForelseStatementsTest.php
tests/Compiler/BladeForelseStatementsTest.php
<?php uses(\Stillat\BladeParser\Tests\ParserTestCase::class); use Illuminate\Contracts\View\ViewCompilationException; test('forelse statements are compiled', function () { $string = '@forelse ($this->getUsers() as $user) breeze @empty empty @endforelse'; $expected = '<?php $__empty_1 = true; $__currentLoopDat...
php
MIT
d6df786667543d31a0fd45d90c8b78042625c4b4
2026-01-05T04:28:43.219923Z
false
Stillat/blade-parser
https://github.com/Stillat/blade-parser/blob/d6df786667543d31a0fd45d90c8b78042625c4b4/tests/Compiler/NodeTransformerTest.php
tests/Compiler/NodeTransformerTest.php
<?php test('node transformer can transform simple nodes', function () { $blade = <<<'BLADE' The beginning. @custom Hello, world! @endcustom The end. BLADE; $result = transformDocument($blade, true); $expected = <<<'EXPECTED' The beginning. @include("something-here") The end. EXPECTED; expect...
php
MIT
d6df786667543d31a0fd45d90c8b78042625c4b4
2026-01-05T04:28:43.219923Z
false
Stillat/blade-parser
https://github.com/Stillat/blade-parser/blob/d6df786667543d31a0fd45d90c8b78042625c4b4/tests/Compiler/ComponentStub.php
tests/Compiler/ComponentStub.php
<?php namespace Stillat\BladeParser\Tests\Compiler; use Illuminate\View\Component; class ComponentStub extends Component { public function render() { return ''; } }
php
MIT
d6df786667543d31a0fd45d90c8b78042625c4b4
2026-01-05T04:28:43.219923Z
false
Stillat/blade-parser
https://github.com/Stillat/blade-parser/blob/d6df786667543d31a0fd45d90c8b78042625c4b4/tests/Compiler/BladeIfStatementsTest.php
tests/Compiler/BladeIfStatementsTest.php
<?php uses(\Stillat\BladeParser\Tests\ParserTestCase::class); test('if statements are compiled', function () { $string = '@if (name(foo(bar))) breeze @endif'; $expected = '<?php if(name(foo(bar))): ?> breeze <?php endif; ?>'; expect($this->compiler->compileString($string))->toEqual($expected); }); test('s...
php
MIT
d6df786667543d31a0fd45d90c8b78042625c4b4
2026-01-05T04:28:43.219923Z
false
Stillat/blade-parser
https://github.com/Stillat/blade-parser/blob/d6df786667543d31a0fd45d90c8b78042625c4b4/tests/Compiler/BladeEndSectionsTest.php
tests/Compiler/BladeEndSectionsTest.php
<?php uses(\Stillat\BladeParser\Tests\ParserTestCase::class); test('end sections are compiled', function () { expect($this->compiler->compileString('@endsection'))->toBe('<?php $__env->stopSection(); ?>'); });
php
MIT
d6df786667543d31a0fd45d90c8b78042625c4b4
2026-01-05T04:28:43.219923Z
false
Stillat/blade-parser
https://github.com/Stillat/blade-parser/blob/d6df786667543d31a0fd45d90c8b78042625c4b4/tests/Compiler/CustomTransformer.php
tests/Compiler/CustomTransformer.php
<?php namespace Stillat\BladeParser\Tests\Compiler; use Stillat\BladeParser\Compiler\Transformers\NodeTransformer; use Stillat\BladeParser\Nodes\DirectiveNode; class CustomTransformer extends NodeTransformer { public function transformNode($node): ?string { if (! $node instanceof DirectiveNode || $no...
php
MIT
d6df786667543d31a0fd45d90c8b78042625c4b4
2026-01-05T04:28:43.219923Z
false
Stillat/blade-parser
https://github.com/Stillat/blade-parser/blob/d6df786667543d31a0fd45d90c8b78042625c4b4/tests/Compiler/BladeUnlessStatementsTest.php
tests/Compiler/BladeUnlessStatementsTest.php
<?php uses(\Stillat\BladeParser\Tests\ParserTestCase::class); test('unless statements are compiled', function () { $string = '@unless (name(foo(bar))) breeze @endunless'; $expected = '<?php if (! (name(foo(bar)))): ?> breeze <?php endif; ?>'; expect($this->compiler->compileString($string))->toEqual($expect...
php
MIT
d6df786667543d31a0fd45d90c8b78042625c4b4
2026-01-05T04:28:43.219923Z
false
Stillat/blade-parser
https://github.com/Stillat/blade-parser/blob/d6df786667543d31a0fd45d90c8b78042625c4b4/tests/Compiler/BladeBreakStatementsTest.php
tests/Compiler/BladeBreakStatementsTest.php
<?php uses(\Stillat\BladeParser\Tests\ParserTestCase::class); test('break statements are compiled', function () { $template = <<<'EOT' @for ($i = 0; $i < 10; $i++) test @break @endfor EOT; $expected = <<<'EXPECTED' <?php for($i = 0; $i < 10; $i++): ?> test <?php break; ?> <?php endfor; ?> EXPECTED; $resu...
php
MIT
d6df786667543d31a0fd45d90c8b78042625c4b4
2026-01-05T04:28:43.219923Z
false
Stillat/blade-parser
https://github.com/Stillat/blade-parser/blob/d6df786667543d31a0fd45d90c8b78042625c4b4/tests/Compiler/BladeJsonTest.php
tests/Compiler/BladeJsonTest.php
<?php uses(\Stillat\BladeParser\Tests\ParserTestCase::class); test('statement is compiled with safe default encoding options', function () { $string = 'var foo = @json($var);'; $expected = 'var foo = <?php echo json_encode($var, 15, 512) ?>;'; expect($this->compiler->compileString($string))->toEqual($expe...
php
MIT
d6df786667543d31a0fd45d90c8b78042625c4b4
2026-01-05T04:28:43.219923Z
false
Stillat/blade-parser
https://github.com/Stillat/blade-parser/blob/d6df786667543d31a0fd45d90c8b78042625c4b4/tests/Compiler/TestAlertComponent.php
tests/Compiler/TestAlertComponent.php
<?php namespace Stillat\BladeParser\Tests\Compiler; use Illuminate\View\Component; class TestAlertComponent extends Component { public function __construct($title = 'foo', $userId = 1) { $this->title = $title; } public function render() { return 'alert'; } }
php
MIT
d6df786667543d31a0fd45d90c8b78042625c4b4
2026-01-05T04:28:43.219923Z
false
Stillat/blade-parser
https://github.com/Stillat/blade-parser/blob/d6df786667543d31a0fd45d90c8b78042625c4b4/tests/Compiler/BladeClassTest.php
tests/Compiler/BladeClassTest.php
<?php uses(\Stillat\BladeParser\Tests\ParserTestCase::class); test('classes are conditionally compiled from array', function () { $template = <<<'EOT' <span @class(['font-bold', 'mt-4', 'ml-2' => true, 'mr-2' => false])></span> EOT; $expected = <<<'EXPECTED' <span class="<?php echo \Illuminate\Support\Arr::to...
php
MIT
d6df786667543d31a0fd45d90c8b78042625c4b4
2026-01-05T04:28:43.219923Z
false
Stillat/blade-parser
https://github.com/Stillat/blade-parser/blob/d6df786667543d31a0fd45d90c8b78042625c4b4/tests/Compiler/BladeCannotStatementsTest.php
tests/Compiler/BladeCannotStatementsTest.php
<?php uses(\Stillat\BladeParser\Tests\ParserTestCase::class); test('cannot statements are compiled', function () { $template = <<<'EOT' @cannot ('update', [$post]) breeze @elsecannot('delete', [$post]) sneeze @endcannot EOT; $expected = <<<'EXPECTED' <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class...
php
MIT
d6df786667543d31a0fd45d90c8b78042625c4b4
2026-01-05T04:28:43.219923Z
false
Stillat/blade-parser
https://github.com/Stillat/blade-parser/blob/d6df786667543d31a0fd45d90c8b78042625c4b4/tests/Compiler/BladeHasSectionTest.php
tests/Compiler/BladeHasSectionTest.php
<?php uses(\Stillat\BladeParser\Tests\ParserTestCase::class); test('has section statements are compiled', function () { $string = '@hasSection("section") breeze @endif'; $expected = '<?php if (! empty(trim($__env->yieldContent("section")))): ?> breeze <?php endif; ?>'; expect($this->compiler->compileString...
php
MIT
d6df786667543d31a0fd45d90c8b78042625c4b4
2026-01-05T04:28:43.219923Z
false
Stillat/blade-parser
https://github.com/Stillat/blade-parser/blob/d6df786667543d31a0fd45d90c8b78042625c4b4/tests/Compiler/BladePrependTest.php
tests/Compiler/BladePrependTest.php
<?php uses(\Stillat\BladeParser\Tests\ParserTestCase::class); use Illuminate\Support\Str; test('prepend is compiled', function () { $string = '@prepend(\'foo\') bar @endprepend'; $expected = '<?php $__env->startPrepend(\'foo\'); ?> bar <?php $__env->stopPrepend(); ?>'; expect($this->compiler->compileStri...
php
MIT
d6df786667543d31a0fd45d90c8b78042625c4b4
2026-01-05T04:28:43.219923Z
false
Stillat/blade-parser
https://github.com/Stillat/blade-parser/blob/d6df786667543d31a0fd45d90c8b78042625c4b4/tests/Compiler/BladeErrorTest.php
tests/Compiler/BladeErrorTest.php
<?php uses(\Stillat\BladeParser\Tests\ParserTestCase::class); test('php statements with expression are compiled', function () { $string = '@php($set = true)'; $expected = '<?php ($set = true); ?>'; expect($this->compiler->compileString($string))->toEqual($expected); }); test('string with parenthesis with ...
php
MIT
d6df786667543d31a0fd45d90c8b78042625c4b4
2026-01-05T04:28:43.219923Z
false
Stillat/blade-parser
https://github.com/Stillat/blade-parser/blob/d6df786667543d31a0fd45d90c8b78042625c4b4/tests/Compiler/BladeOverwriteSectionTest.php
tests/Compiler/BladeOverwriteSectionTest.php
<?php uses(\Stillat\BladeParser\Tests\ParserTestCase::class); test('overwrite sections are compiled', function () { expect($this->compiler->compileString('@overwrite'))->toBe('<?php $__env->stopSection(true); ?>'); });
php
MIT
d6df786667543d31a0fd45d90c8b78042625c4b4
2026-01-05T04:28:43.219923Z
false
Stillat/blade-parser
https://github.com/Stillat/blade-parser/blob/d6df786667543d31a0fd45d90c8b78042625c4b4/tests/Compiler/BladeStackTest.php
tests/Compiler/BladeStackTest.php
<?php uses(\Stillat\BladeParser\Tests\ParserTestCase::class); test('stack is compiled', function () { $string = '@stack(\'foo\')'; $expected = '<?php echo $__env->yieldPushContent(\'foo\'); ?>'; expect($this->compiler->compileString($string))->toEqual($expected); });
php
MIT
d6df786667543d31a0fd45d90c8b78042625c4b4
2026-01-05T04:28:43.219923Z
false
Stillat/blade-parser
https://github.com/Stillat/blade-parser/blob/d6df786667543d31a0fd45d90c8b78042625c4b4/tests/Compiler/BladeUnsetStatementsTest.php
tests/Compiler/BladeUnsetStatementsTest.php
<?php uses(\Stillat\BladeParser\Tests\ParserTestCase::class); test('unset statements are compiled', function () { $string = '@unset ($unset)'; $expected = '<?php unset($unset); ?>'; expect($this->compiler->compileString($string))->toEqual($expected); });
php
MIT
d6df786667543d31a0fd45d90c8b78042625c4b4
2026-01-05T04:28:43.219923Z
false
Stillat/blade-parser
https://github.com/Stillat/blade-parser/blob/d6df786667543d31a0fd45d90c8b78042625c4b4/tests/Compiler/BladeCheckedStatementsTest.php
tests/Compiler/BladeCheckedStatementsTest.php
<?php uses(\Stillat\BladeParser\Tests\ParserTestCase::class); test('selected statements are compiled', function () { $template = '<input @selected(name(foo(bar)))/>'; $expected = "<input <?php if(name(foo(bar))): echo 'selected'; endif; ?>/>"; expect($this->compiler->compileString($template))->toEqual($ex...
php
MIT
d6df786667543d31a0fd45d90c8b78042625c4b4
2026-01-05T04:28:43.219923Z
false
Stillat/blade-parser
https://github.com/Stillat/blade-parser/blob/d6df786667543d31a0fd45d90c8b78042625c4b4/tests/Compiler/BladeIfEmptyStatementsTest.php
tests/Compiler/BladeIfEmptyStatementsTest.php
<?php uses(\Stillat\BladeParser\Tests\ParserTestCase::class); test('if statements are compiled', function () { $string = '@empty ($test) breeze @endempty'; $expected = '<?php if(empty($test)): ?> breeze <?php endif; ?>'; expect($this->compiler->compileString($string))->toEqual($expected); });
php
MIT
d6df786667543d31a0fd45d90c8b78042625c4b4
2026-01-05T04:28:43.219923Z
false
Stillat/blade-parser
https://github.com/Stillat/blade-parser/blob/d6df786667543d31a0fd45d90c8b78042625c4b4/tests/Compiler/BladeComponentTagCompilerTest.php
tests/Compiler/BladeComponentTagCompilerTest.php
<?php uses(\Stillat\BladeParser\Tests\ParserTestCase::class); use Illuminate\Container\Container; use Illuminate\Contracts\Foundation\Application; use Illuminate\Contracts\View\Factory; use Illuminate\View\Component; use Illuminate\View\ComponentAttributeBag; use Mockery as m; use Stillat\BladeParser\Compiler\Compile...
php
MIT
d6df786667543d31a0fd45d90c8b78042625c4b4
2026-01-05T04:28:43.219923Z
true
Stillat/blade-parser
https://github.com/Stillat/blade-parser/blob/d6df786667543d31a0fd45d90c8b78042625c4b4/tests/Compiler/BladeVerbatimTest.php
tests/Compiler/BladeVerbatimTest.php
<?php uses(\Stillat\BladeParser\Tests\ParserTestCase::class); test('verbatim blocks are compiled', function () { $string = '@verbatim {{ $a }} @if($b) {{ $b }} @endif @endverbatim'; $expected = ' {{ $a }} @if($b) {{ $b }} @endif '; expect($this->compiler->compileString($string))->toEqual($expected); }); t...
php
MIT
d6df786667543d31a0fd45d90c8b78042625c4b4
2026-01-05T04:28:43.219923Z
false
Stillat/blade-parser
https://github.com/Stillat/blade-parser/blob/d6df786667543d31a0fd45d90c8b78042625c4b4/tests/Compiler/BladeUseTest.php
tests/Compiler/BladeUseTest.php
<?php uses(\Stillat\BladeParser\Tests\ParserTestCase::class); test('use statements are compiled', function () { $string = "Foo @use('SomeNamespace\SomeClass', 'Foo') bar"; $expected = "Foo <?php use \SomeNamespace\SomeClass as Foo; ?> bar"; expect($this->compiler->compileString($string))->toEqual($expected...
php
MIT
d6df786667543d31a0fd45d90c8b78042625c4b4
2026-01-05T04:28:43.219923Z
false
Stillat/blade-parser
https://github.com/Stillat/blade-parser/blob/d6df786667543d31a0fd45d90c8b78042625c4b4/tests/Compiler/BladeStopSectionTest.php
tests/Compiler/BladeStopSectionTest.php
<?php uses(\Stillat\BladeParser\Tests\ParserTestCase::class); test('stop sections are compiled', function () { expect($this->compiler->compileString('@stop'))->toBe('<?php $__env->stopSection(); ?>'); });
php
MIT
d6df786667543d31a0fd45d90c8b78042625c4b4
2026-01-05T04:28:43.219923Z
false
Stillat/blade-parser
https://github.com/Stillat/blade-parser/blob/d6df786667543d31a0fd45d90c8b78042625c4b4/tests/Compiler/CustomCompiler.php
tests/Compiler/CustomCompiler.php
<?php namespace Stillat\BladeParser\Tests\Compiler; use Stillat\BladeParser\Contracts\CustomComponentTagCompiler; use Stillat\BladeParser\Nodes\Components\ComponentNode; class CustomCompiler implements CustomComponentTagCompiler { public function compile(ComponentNode $component): ?string { return 'M...
php
MIT
d6df786667543d31a0fd45d90c8b78042625c4b4
2026-01-05T04:28:43.219923Z
false
Stillat/blade-parser
https://github.com/Stillat/blade-parser/blob/d6df786667543d31a0fd45d90c8b78042625c4b4/tests/Compiler/BladeSectionTest.php
tests/Compiler/BladeSectionTest.php
<?php uses(\Stillat\BladeParser\Tests\ParserTestCase::class); test('section starts are compiled', function () { expect($this->compiler->compileString('@section(\'foo\')'))->toBe('<?php $__env->startSection(\'foo\'); ?>'); expect($this->compiler->compileString('@section(name(foo))'))->toBe('<?php $__env->startS...
php
MIT
d6df786667543d31a0fd45d90c8b78042625c4b4
2026-01-05T04:28:43.219923Z
false
Stillat/blade-parser
https://github.com/Stillat/blade-parser/blob/d6df786667543d31a0fd45d90c8b78042625c4b4/tests/Compiler/BladeHelpersTest.php
tests/Compiler/BladeHelpersTest.php
<?php uses(\Stillat\BladeParser\Tests\ParserTestCase::class); test('echos are compiled', function () { expect($this->compiler->compileString('@csrf'))->toBe('<?php echo csrf_field(); ?>'); expect($this->compiler->compileString("@method('patch')"))->toBe('<?php echo method_field(\'patch\'); ?>'); expect($th...
php
MIT
d6df786667543d31a0fd45d90c8b78042625c4b4
2026-01-05T04:28:43.219923Z
false
Stillat/blade-parser
https://github.com/Stillat/blade-parser/blob/d6df786667543d31a0fd45d90c8b78042625c4b4/tests/Compiler/BladeIncludesTest.php
tests/Compiler/BladeIncludesTest.php
<?php uses(\Stillat\BladeParser\Tests\ParserTestCase::class); test('eachs are compiled', function () { expect($this->compiler->compileString('@each(\'foo\', \'bar\')'))->toBe('<?php echo $__env->renderEach(\'foo\', \'bar\'); ?>'); expect($this->compiler->compileString('@each(name(foo))'))->toBe('<?php echo $__...
php
MIT
d6df786667543d31a0fd45d90c8b78042625c4b4
2026-01-05T04:28:43.219923Z
false
Stillat/blade-parser
https://github.com/Stillat/blade-parser/blob/d6df786667543d31a0fd45d90c8b78042625c4b4/tests/Fragments/BasicFragmentsTest.php
tests/Fragments/BasicFragmentsTest.php
<?php uses(\Stillat\BladeParser\Tests\ParserTestCase::class); use Stillat\BladeParser\Document\Document; use Stillat\BladeParser\Nodes\AbstractNode; use Stillat\BladeParser\Nodes\DirectiveNode; use Stillat\BladeParser\Nodes\EchoNode; use Stillat\BladeParser\Nodes\Fragments\FragmentParameterType; use Stillat\BladeParse...
php
MIT
d6df786667543d31a0fd45d90c8b78042625c4b4
2026-01-05T04:28:43.219923Z
false
Stillat/blade-parser
https://github.com/Stillat/blade-parser/blob/d6df786667543d31a0fd45d90c8b78042625c4b4/tests/Support/PathsTest.php
tests/Support/PathsTest.php
<?php use Stillat\BladeParser\Support\Utilities\Paths; test('null paths return null', function () { expect(Paths::normalizePath(null))->toBeNull(); expect(Paths::normalizePathWithTrailingSlash(null))->toBeNull(); }); test('trailing slash is not duplicated', function () { expect(Paths::normalizePathWithTr...
php
MIT
d6df786667543d31a0fd45d90c8b78042625c4b4
2026-01-05T04:28:43.219923Z
false
Stillat/blade-parser
https://github.com/Stillat/blade-parser/blob/d6df786667543d31a0fd45d90c8b78042625c4b4/tests/Parser/PhpTagTest.php
tests/Parser/PhpTagTest.php
<?php uses(\Stillat\BladeParser\Tests\ParserTestCase::class); use Stillat\BladeParser\Nodes\PhpTagNode; use Stillat\BladeParser\Nodes\PhpTagType; test('basic php tags', function () { $template = <<<'EOT' <?php $variable = 'value'; ?> EOT; $nodes = $this->parseNodes($template); expect($nodes)->toHaveCo...
php
MIT
d6df786667543d31a0fd45d90c8b78042625c4b4
2026-01-05T04:28:43.219923Z
false
Stillat/blade-parser
https://github.com/Stillat/blade-parser/blob/d6df786667543d31a0fd45d90c8b78042625c4b4/tests/Parser/IncompleteDocumentsTest.php
tests/Parser/IncompleteDocumentsTest.php
<?php uses(\Stillat\BladeParser\Tests\ParserTestCase::class); use Stillat\BladeParser\Tests\DocumentSplitter; test('incomplete documents one', function (string $template) { $doc = $this->getDocument($template)->resolveStructures(); expect((string) $doc)->toBe($template); })->with(splitWelcomeView()); test('...
php
MIT
d6df786667543d31a0fd45d90c8b78042625c4b4
2026-01-05T04:28:43.219923Z
false
Stillat/blade-parser
https://github.com/Stillat/blade-parser/blob/d6df786667543d31a0fd45d90c8b78042625c4b4/tests/Parser/PhpBlockTest.php
tests/Parser/PhpBlockTest.php
<?php uses(\Stillat\BladeParser\Tests\ParserTestCase::class); use Stillat\BladeParser\Nodes\PhpBlockNode; test('php block does not consume literal character', function () { $template = <<<'EOT' start @php @endphp end EOT; $nodes = $this->parseNodes($template); expect($nodes)->toHaveCount(3); $thi...
php
MIT
d6df786667543d31a0fd45d90c8b78042625c4b4
2026-01-05T04:28:43.219923Z
false
Stillat/blade-parser
https://github.com/Stillat/blade-parser/blob/d6df786667543d31a0fd45d90c8b78042625c4b4/tests/Parser/TagComponentsTest.php
tests/Parser/TagComponentsTest.php
<?php uses(\Stillat\BladeParser\Tests\ParserTestCase::class); use Stillat\BladeParser\Nodes\Components\ComponentNode; use Stillat\BladeParser\Nodes\Components\ParameterNode; use Stillat\BladeParser\Nodes\Components\ParameterType; use Stillat\BladeParser\Nodes\LiteralNode; test('basic tag component opening', function ...
php
MIT
d6df786667543d31a0fd45d90c8b78042625c4b4
2026-01-05T04:28:43.219923Z
false
Stillat/blade-parser
https://github.com/Stillat/blade-parser/blob/d6df786667543d31a0fd45d90c8b78042625c4b4/tests/Parser/ParserDetailsTest.php
tests/Parser/ParserDetailsTest.php
<?php uses(\Stillat\BladeParser\Tests\ParserTestCase::class); test('parser original text', function () { $parser = $this->parser(); $input = "<?php echo e(\$name); ?>\r\n\r\n"; $parser->parse($input); expect($parser->getOriginalContent())->toBe($input); // Newlines are internally converted. $t...
php
MIT
d6df786667543d31a0fd45d90c8b78042625c4b4
2026-01-05T04:28:43.219923Z
false
Stillat/blade-parser
https://github.com/Stillat/blade-parser/blob/d6df786667543d31a0fd45d90c8b78042625c4b4/tests/Parser/DirectiveNamesTest.php
tests/Parser/DirectiveNamesTest.php
<?php uses(\Stillat\BladeParser\Tests\ParserTestCase::class); test('directives with leading underscores are parsed', function () { $this->registerDirective('_test'); $nodes = $this->parseNodes('@_test'); expect($nodes)->toHaveCount(1); $this->assertDirectiveName($nodes[0], '_test'); $this->regist...
php
MIT
d6df786667543d31a0fd45d90c8b78042625c4b4
2026-01-05T04:28:43.219923Z
false
Stillat/blade-parser
https://github.com/Stillat/blade-parser/blob/d6df786667543d31a0fd45d90c8b78042625c4b4/tests/Parser/VerbatimTest.php
tests/Parser/VerbatimTest.php
<?php uses(\Stillat\BladeParser\Tests\ParserTestCase::class); use Stillat\BladeParser\Nodes\VerbatimNode; test('verbatim does not create additional nodes', function () { $template = <<<'EOT' start @verbatim start start {{-- comment!!! --}}3 s1@props-two(['color' => (true ?? 'gray')]) s2@directive @directive some...
php
MIT
d6df786667543d31a0fd45d90c8b78042625c4b4
2026-01-05T04:28:43.219923Z
false
Stillat/blade-parser
https://github.com/Stillat/blade-parser/blob/d6df786667543d31a0fd45d90c8b78042625c4b4/tests/Parser/PositionsTest.php
tests/Parser/PositionsTest.php
<?php uses(\Stillat\BladeParser\Tests\ParserTestCase::class); use Stillat\BladeParser\Nodes\Components\ComponentNode; use Stillat\BladeParser\Nodes\DirectiveNode; use Stillat\BladeParser\Nodes\LiteralNode; test('literal document positions', function () { $template = <<<'EOT' Just a literal that spans multiple...
php
MIT
d6df786667543d31a0fd45d90c8b78042625c4b4
2026-01-05T04:28:43.219923Z
false
Stillat/blade-parser
https://github.com/Stillat/blade-parser/blob/d6df786667543d31a0fd45d90c8b78042625c4b4/tests/Parser/NodeErrorsTest.php
tests/Parser/NodeErrorsTest.php
<?php uses(\Stillat\BladeParser\Tests\ParserTestCase::class); use Stillat\BladeParser\Errors\Exceptions\InvalidCastException; test('as directive throws invalid cast exception', function () { $this->expectException(InvalidCastException::class); $this->getDocument('{{ $hello }}')->getNodeArray()[0]->asDirective...
php
MIT
d6df786667543d31a0fd45d90c8b78042625c4b4
2026-01-05T04:28:43.219923Z
false
Stillat/blade-parser
https://github.com/Stillat/blade-parser/blob/d6df786667543d31a0fd45d90c8b78042625c4b4/tests/Parser/EchoTest.php
tests/Parser/EchoTest.php
<?php uses(\Stillat\BladeParser\Tests\ParserTestCase::class); use Stillat\BladeParser\Nodes\EchoNode; test('echo containing strings', function () { $echo = $this->getDocument('{{ "hello world" }}')->firstOfType(EchoNode::class)->asEcho(); expect($echo->innerContent)->toBe(' "hello world" '); $echo = $thi...
php
MIT
d6df786667543d31a0fd45d90c8b78042625c4b4
2026-01-05T04:28:43.219923Z
false
Stillat/blade-parser
https://github.com/Stillat/blade-parser/blob/d6df786667543d31a0fd45d90c8b78042625c4b4/tests/Parser/CommentsTest.php
tests/Parser/CommentsTest.php
<?php uses(\Stillat\BladeParser\Tests\ParserTestCase::class); use Stillat\BladeParser\Nodes\CommentNode; test('basic comments', function () { $template = '{{-- This is a comment --}}'; $nodes = $this->parseNodes($template); expect($nodes)->toHaveCount(1); expect($nodes[0])->toBeInstanceOf(CommentNode...
php
MIT
d6df786667543d31a0fd45d90c8b78042625c4b4
2026-01-05T04:28:43.219923Z
false
Stillat/blade-parser
https://github.com/Stillat/blade-parser/blob/d6df786667543d31a0fd45d90c8b78042625c4b4/tests/Parser/DirectiveDiscoveryTest.php
tests/Parser/DirectiveDiscoveryTest.php
<?php uses(\Stillat\BladeParser\Tests\ParserTestCase::class); test('unregistered directives are not parsed', function () { $template = '@_not_a_directive'; $nodes = $this->parseNodes($template); expect($nodes)->toHaveCount(1); $this->assertLiteralContent($nodes[0], $template); $this->registerDirec...
php
MIT
d6df786667543d31a0fd45d90c8b78042625c4b4
2026-01-05T04:28:43.219923Z
false
Stillat/blade-parser
https://github.com/Stillat/blade-parser/blob/d6df786667543d31a0fd45d90c8b78042625c4b4/tests/Parser/BasicParserNodesTest.php
tests/Parser/BasicParserNodesTest.php
<?php uses(\Stillat\BladeParser\Tests\ParserTestCase::class); use Stillat\BladeParser\Nodes\Components\ComponentNode; use Stillat\BladeParser\Nodes\DirectiveNode; use Stillat\BladeParser\Nodes\EchoNode; use Stillat\BladeParser\Nodes\EchoType; use Stillat\BladeParser\Nodes\LiteralNode; use Stillat\BladeParser\Nodes\Php...
php
MIT
d6df786667543d31a0fd45d90c8b78042625c4b4
2026-01-05T04:28:43.219923Z
false
Stillat/blade-parser
https://github.com/Stillat/blade-parser/blob/d6df786667543d31a0fd45d90c8b78042625c4b4/tests/Parser/DirectiveParametersTest.php
tests/Parser/DirectiveParametersTest.php
<?php uses(\Stillat\BladeParser\Tests\ParserTestCase::class); use Stillat\BladeParser\Nodes\ArgumentContentType; use Stillat\BladeParser\Nodes\DirectiveNode; test('directive parameters containing parenthesis', function () { $template = '@php($conditionOne || ($conditionTwo && $conditionThree))'; $nodes = $thi...
php
MIT
d6df786667543d31a0fd45d90c8b78042625c4b4
2026-01-05T04:28:43.219923Z
false
Stillat/blade-parser
https://github.com/Stillat/blade-parser/blob/d6df786667543d31a0fd45d90c8b78042625c4b4/tests/Parser/CustomTagComponentsTest.php
tests/Parser/CustomTagComponentsTest.php
<?php uses(\Stillat\BladeParser\Tests\ParserTestCase::class); use Stillat\BladeParser\Nodes\Components\ComponentNode; test('custom tags can be parsed', function () { $template = <<<'EOT' <x-alert :$message /> <custom-alert :$message /> EOT; $parser = $this->parser(); $parser->parse($template); ex...
php
MIT
d6df786667543d31a0fd45d90c8b78042625c4b4
2026-01-05T04:28:43.219923Z
false
Stillat/blade-parser
https://github.com/Stillat/blade-parser/blob/d6df786667543d31a0fd45d90c8b78042625c4b4/tests/Parser/EscapedContentTest.php
tests/Parser/EscapedContentTest.php
<?php uses(\Stillat\BladeParser\Tests\ParserTestCase::class); use Stillat\BladeParser\Compiler\CompilerServices\CoreDirectiveRetriever; use Stillat\BladeParser\Nodes\LiteralNode; test('basic escaped content', function () { $template = <<<'EOT' @{{ $variable }} @{!! $variable !!} @@directive @{{ $var @{{{ $variabl...
php
MIT
d6df786667543d31a0fd45d90c8b78042625c4b4
2026-01-05T04:28:43.219923Z
false
Stillat/blade-parser
https://github.com/Stillat/blade-parser/blob/d6df786667543d31a0fd45d90c8b78042625c4b4/tests/CompilerServices/DirectiveDetailsTest.php
tests/CompilerServices/DirectiveDetailsTest.php
<?php uses(\Stillat\BladeParser\Tests\ParserTestCase::class); use Stillat\BladeParser\Compiler\CompilerServices\CoreDirectiveRetriever; test('directive details retrieves information without exceptions', function () { $instance = CoreDirectiveRetriever::instance(); expect($instance)->not->toBeNull(); expec...
php
MIT
d6df786667543d31a0fd45d90c8b78042625c4b4
2026-01-05T04:28:43.219923Z
false
Stillat/blade-parser
https://github.com/Stillat/blade-parser/blob/d6df786667543d31a0fd45d90c8b78042625c4b4/tests/CompilerServices/StringUtilitiesTest.php
tests/CompilerServices/StringUtilitiesTest.php
<?php uses(\Stillat\BladeParser\Tests\ParserTestCase::class); use Stillat\BladeParser\Compiler\CompilerServices\StringUtilities; test('wrapping does not wrap dollar variables', function () { expect(StringUtilities::wrapInSingleQuotes('$test'))->toBe('$test'); }); test('wrapping single quote strings does not doub...
php
MIT
d6df786667543d31a0fd45d90c8b78042625c4b4
2026-01-05T04:28:43.219923Z
false
Stillat/blade-parser
https://github.com/Stillat/blade-parser/blob/d6df786667543d31a0fd45d90c8b78042625c4b4/tests/CompilerServices/LoopVariablesTest.php
tests/CompilerServices/LoopVariablesTest.php
<?php uses(\Stillat\BladeParser\Tests\ParserTestCase::class); use Stillat\BladeParser\Compiler\CompilerServices\LoopVariablesExtractor; beforeEach(function () { $this->extractor = new LoopVariablesExtractor; }); test('basic loop variable extraction', function () { $input = '($users as $user)'; $result = ...
php
MIT
d6df786667543d31a0fd45d90c8b78042625c4b4
2026-01-05T04:28:43.219923Z
false
Stillat/blade-parser
https://github.com/Stillat/blade-parser/blob/d6df786667543d31a0fd45d90c8b78042625c4b4/tests/CompilerServices/AttributeCompilerTest.php
tests/CompilerServices/AttributeCompilerTest.php
<?php uses(\Stillat\BladeParser\Tests\ParserTestCase::class); use Stillat\BladeParser\Compiler\CompilerServices\AttributeCompiler; use Stillat\BladeParser\Parser\DocumentParser; beforeEach(function () { $this->attributeCompiler = new AttributeCompiler; $template = <<<'TEMAPLTE' <t:component parameter="conte...
php
MIT
d6df786667543d31a0fd45d90c8b78042625c4b4
2026-01-05T04:28:43.219923Z
false
Stillat/blade-parser
https://github.com/Stillat/blade-parser/blob/d6df786667543d31a0fd45d90c8b78042625c4b4/tests/CompilerServices/StringSplitterTest.php
tests/CompilerServices/StringSplitterTest.php
<?php uses(\Stillat\BladeParser\Tests\ParserTestCase::class); use Stillat\BladeParser\Compiler\CompilerServices\StringSplitter; beforeEach(function () { $this->splitter = new StringSplitter; }); test('basic string splitting', function () { $input = '($foo as $bar)'; $result = $this->splitter->split($inpu...
php
MIT
d6df786667543d31a0fd45d90c8b78042625c4b4
2026-01-05T04:28:43.219923Z
false
Stillat/blade-parser
https://github.com/Stillat/blade-parser/blob/d6df786667543d31a0fd45d90c8b78042625c4b4/tests/CompilerServices/ArgStringSplitterTest.php
tests/CompilerServices/ArgStringSplitterTest.php
<?php uses(\Stillat\BladeParser\Tests\ParserTestCase::class); use Stillat\BladeParser\Compiler\CompilerServices\ArgStringSplitter; beforeEach(function () { $this->splitter = new ArgStringSplitter; }); test('argument string splitting', function () { $input = <<<'EOT' ["one, two", $var1, $var2], $hello, 12345....
php
MIT
d6df786667543d31a0fd45d90c8b78042625c4b4
2026-01-05T04:28:43.219923Z
false
Stillat/blade-parser
https://github.com/Stillat/blade-parser/blob/d6df786667543d31a0fd45d90c8b78042625c4b4/tests/CompilerServices/StringUnwrappingTest.php
tests/CompilerServices/StringUnwrappingTest.php
<?php uses(\Stillat\BladeParser\Tests\ParserTestCase::class); use Stillat\BladeParser\Compiler\CompilerServices\StringUtilities; test('basic string unwrapping', function ($input, $expected) { expect(StringUtilities::unwrapParentheses($input))->toBe($expected); })->with('stringUnwrapDataProvider'); dataset('strin...
php
MIT
d6df786667543d31a0fd45d90c8b78042625c4b4
2026-01-05T04:28:43.219923Z
false
Stillat/blade-parser
https://github.com/Stillat/blade-parser/blob/d6df786667543d31a0fd45d90c8b78042625c4b4/tests/Feature/ExampleTest.php
tests/Feature/ExampleTest.php
<?php test('example', function () { expect(true)->toBeTrue(); });
php
MIT
d6df786667543d31a0fd45d90c8b78042625c4b4
2026-01-05T04:28:43.219923Z
false
Stillat/blade-parser
https://github.com/Stillat/blade-parser/blob/d6df786667543d31a0fd45d90c8b78042625c4b4/tests/Mutations/EchoNodeMutationsTest.php
tests/Mutations/EchoNodeMutationsTest.php
<?php uses(\Stillat\BladeParser\Tests\ParserTestCase::class); use Stillat\BladeParser\Nodes\EchoNode; use Stillat\BladeParser\Nodes\EchoType; test('basic echo node mutations', function () { $doc = $this->getDocument('A{{ $echo }}B{{ $echoTwo }}C'); /** @var EchoNode $echo */ $echo = $doc->firstOfType(Ech...
php
MIT
d6df786667543d31a0fd45d90c8b78042625c4b4
2026-01-05T04:28:43.219923Z
false
Stillat/blade-parser
https://github.com/Stillat/blade-parser/blob/d6df786667543d31a0fd45d90c8b78042625c4b4/tests/Mutations/PhpTagMutationsTest.php
tests/Mutations/PhpTagMutationsTest.php
<?php uses(\Stillat\BladeParser\Tests\ParserTestCase::class); use Stillat\BladeParser\Nodes\PhpTagNode; use Stillat\BladeParser\Nodes\PhpTagType; test('php tag content can be changed', function () { $template = <<<'EOT' One <?php $embeddedPhp = true; ?> Two EOT; $doc = $this->g...
php
MIT
d6df786667543d31a0fd45d90c8b78042625c4b4
2026-01-05T04:28:43.219923Z
false
Stillat/blade-parser
https://github.com/Stillat/blade-parser/blob/d6df786667543d31a0fd45d90c8b78042625c4b4/tests/Mutations/LiteralMutationsTest.php
tests/Mutations/LiteralMutationsTest.php
<?php uses(\Stillat\BladeParser\Tests\ParserTestCase::class); use Stillat\BladeParser\Nodes\LiteralNode; test('literal content can be changed', function () { $doc = $this->getDocument('a @if b @if c @if d'); $doc->getLiterals()->each(function (LiteralNode $literal, $key) { // By default, the content ...
php
MIT
d6df786667543d31a0fd45d90c8b78042625c4b4
2026-01-05T04:28:43.219923Z
false
Stillat/blade-parser
https://github.com/Stillat/blade-parser/blob/d6df786667543d31a0fd45d90c8b78042625c4b4/tests/Mutations/PhpBlockMutationsTest.php
tests/Mutations/PhpBlockMutationsTest.php
<?php uses(\Stillat\BladeParser\Tests\ParserTestCase::class); test('php block content can be changed', function () { $template = <<<'EOT' One @php if ('this' == 'that') { doSomething(); } else { doADifferentThing(); } @endphp Two EOT; $doc = $this->getDocument($template); ...
php
MIT
d6df786667543d31a0fd45d90c8b78042625c4b4
2026-01-05T04:28:43.219923Z
false
Stillat/blade-parser
https://github.com/Stillat/blade-parser/blob/d6df786667543d31a0fd45d90c8b78042625c4b4/tests/Mutations/VerbatimMutationsTest.php
tests/Mutations/VerbatimMutationsTest.php
<?php uses(\Stillat\BladeParser\Tests\ParserTestCase::class); test('verbatim content can be changed', function () { $template = <<<'EOT' One @verbatim start {{-- comment!!! --}}3 s1@props-two(['color' => (true ?? 'gray')]) s2@directive @directive something s3@props-three (['color' => (true ?? 'gray')]) @props(['c...
php
MIT
d6df786667543d31a0fd45d90c8b78042625c4b4
2026-01-05T04:28:43.219923Z
false
Stillat/blade-parser
https://github.com/Stillat/blade-parser/blob/d6df786667543d31a0fd45d90c8b78042625c4b4/tests/Mutations/CommentMutationsTest.php
tests/Mutations/CommentMutationsTest.php
<?php uses(\Stillat\BladeParser\Tests\ParserTestCase::class); test('comments can be changed', function () { $doc = $this->getDocument('One {{-- This is the comment --}} Two'); $comment = $doc->getComments()->first(); $comment->setContent('I am the content now!'); expect((string) $doc)->toBe('One {{-- ...
php
MIT
d6df786667543d31a0fd45d90c8b78042625c4b4
2026-01-05T04:28:43.219923Z
false
Stillat/blade-parser
https://github.com/Stillat/blade-parser/blob/d6df786667543d31a0fd45d90c8b78042625c4b4/tests/Mutations/DirectiveMutationsTest.php
tests/Mutations/DirectiveMutationsTest.php
<?php uses(\Stillat\BladeParser\Tests\ParserTestCase::class); use Stillat\BladeParser\Nodes\DirectiveNode; test('directive names can be changed', function () { $doc = $this->getDocument('One @can Two'); $directive = $doc->getDirectives()->first(); $directive->setName('auth'); expect((string) $doc)->t...
php
MIT
d6df786667543d31a0fd45d90c8b78042625c4b4
2026-01-05T04:28:43.219923Z
false
Stillat/blade-parser
https://github.com/Stillat/blade-parser/blob/d6df786667543d31a0fd45d90c8b78042625c4b4/tests/Mutations/ComponentMutationsTest.php
tests/Mutations/ComponentMutationsTest.php
<?php uses(\Stillat\BladeParser\Tests\ParserTestCase::class); use Stillat\BladeParser\Errors\Exceptions\DuplicateParameterException; use Stillat\BladeParser\Errors\Exceptions\InvalidParameterException; test('duplicate parameter instances throws exception', function () { $this->expectException(DuplicateParameterEx...
php
MIT
d6df786667543d31a0fd45d90c8b78042625c4b4
2026-01-05T04:28:43.219923Z
false
Stillat/blade-parser
https://github.com/Stillat/blade-parser/blob/d6df786667543d31a0fd45d90c8b78042625c4b4/tests/Mutations/ComponentParametersTest.php
tests/Mutations/ComponentParametersTest.php
<?php uses(\Stillat\BladeParser\Tests\ParserTestCase::class); use Stillat\BladeParser\Nodes\Components\ParameterFactory; use Stillat\BladeParser\Nodes\Components\ParameterNode; use Stillat\BladeParser\Nodes\Components\ParameterType; test('creating parameters from text', function () { $params = ParameterFactory::f...
php
MIT
d6df786667543d31a0fd45d90c8b78042625c4b4
2026-01-05T04:28:43.219923Z
false
Stillat/blade-parser
https://github.com/Stillat/blade-parser/blob/d6df786667543d31a0fd45d90c8b78042625c4b4/tests/Validation/DirectiveArgumentSpanningLinesTest.php
tests/Validation/DirectiveArgumentSpanningLinesTest.php
<?php uses(\Stillat\BladeParser\Tests\ParserTestCase::class); use Stillat\BladeParser\Document\Document; use Stillat\BladeParser\Validation\Validators\DirectiveArgumentsSpanningLinesValidator; test('directive argument spanning lines validator detects issues', function () { $template = <<<'BLADE' @if ($something ...
php
MIT
d6df786667543d31a0fd45d90c8b78042625c4b4
2026-01-05T04:28:43.219923Z
false
Stillat/blade-parser
https://github.com/Stillat/blade-parser/blob/d6df786667543d31a0fd45d90c8b78042625c4b4/tests/Validation/DebugDirectiveTest.php
tests/Validation/DebugDirectiveTest.php
<?php uses(\Stillat\BladeParser\Tests\ParserTestCase::class); use Stillat\BladeParser\Compiler\CompilerServices\CoreDirectiveRetriever; use Stillat\BladeParser\Document\Document; use Stillat\BladeParser\Validation\Validators\DebugDirectiveValidator; test('debug directive validator detects issues', function (string $d...
php
MIT
d6df786667543d31a0fd45d90c8b78042625c4b4
2026-01-05T04:28:43.219923Z
false
Stillat/blade-parser
https://github.com/Stillat/blade-parser/blob/d6df786667543d31a0fd45d90c8b78042625c4b4/tests/Validation/NoArgumentsTest.php
tests/Validation/NoArgumentsTest.php
<?php uses(\Stillat\BladeParser\Tests\ParserTestCase::class); use Stillat\BladeParser\Document\Document; use Stillat\BladeParser\Validation\Validators\NoArgumentsValidator; test('no arguments validator detects issues', function ($directiveName) { $message = "[@{$directiveName}] should not have any arguments"; ...
php
MIT
d6df786667543d31a0fd45d90c8b78042625c4b4
2026-01-05T04:28:43.219923Z
false
Stillat/blade-parser
https://github.com/Stillat/blade-parser/blob/d6df786667543d31a0fd45d90c8b78042625c4b4/tests/Validation/ForElseStructureTest.php
tests/Validation/ForElseStructureTest.php
<?php uses(\Stillat\BladeParser\Tests\ParserTestCase::class); use Stillat\BladeParser\Document\Document; use Stillat\BladeParser\Validation\Validators\ForElseStructureValidator; test('for else validator detects too many empty directives', function () { $template = <<<'BLADE' @forelse ($users as $user) @empty @em...
php
MIT
d6df786667543d31a0fd45d90c8b78042625c4b4
2026-01-05T04:28:43.219923Z
false
Stillat/blade-parser
https://github.com/Stillat/blade-parser/blob/d6df786667543d31a0fd45d90c8b78042625c4b4/tests/Validation/ComponentShorthandVariableParameterTest.php
tests/Validation/ComponentShorthandVariableParameterTest.php
<?php uses(\Stillat\BladeParser\Tests\ParserTestCase::class); use Stillat\BladeParser\Document\Document; use Stillat\BladeParser\Validation\Validators\ComponentShorthandVariableParameterValidator; test('component shorthand validator detects issues', function () { $template = <<<'BLADE' <x-profile $:message /> <x-...
php
MIT
d6df786667543d31a0fd45d90c8b78042625c4b4
2026-01-05T04:28:43.219923Z
false
Stillat/blade-parser
https://github.com/Stillat/blade-parser/blob/d6df786667543d31a0fd45d90c8b78042625c4b4/tests/Validation/DuplicateConditionExpressionsTest.php
tests/Validation/DuplicateConditionExpressionsTest.php
<?php uses(\Stillat\BladeParser\Tests\ParserTestCase::class); use Stillat\BladeParser\Document\Document; use Stillat\BladeParser\Validation\Validators\DuplicateConditionExpressionsValidator; test('duplicate condition expression validator detects issues', function () { $template = <<<'BLADE' @if ($this == 'that') ...
php
MIT
d6df786667543d31a0fd45d90c8b78042625c4b4
2026-01-05T04:28:43.219923Z
false
Stillat/blade-parser
https://github.com/Stillat/blade-parser/blob/d6df786667543d31a0fd45d90c8b78042625c4b4/tests/Validation/NodeCompilationTest.php
tests/Validation/NodeCompilationTest.php
<?php uses(\Stillat\BladeParser\Tests\ParserTestCase::class); use Stillat\BladeParser\Document\Document; use Stillat\BladeParser\Validation\Validators\NodeCompilationValidator; test('node compilation validator detects issues', function () { $template = <<<'BLADE' {{ $hello++++ }} {{ $wor...
php
MIT
d6df786667543d31a0fd45d90c8b78042625c4b4
2026-01-05T04:28:43.219923Z
false
Stillat/blade-parser
https://github.com/Stillat/blade-parser/blob/d6df786667543d31a0fd45d90c8b78042625c4b4/tests/Validation/RecursiveIncludeTest.php
tests/Validation/RecursiveIncludeTest.php
<?php uses(\Stillat\BladeParser\Tests\ParserTestCase::class); use Stillat\BladeParser\Document\Document; use Stillat\BladeParser\Validation\Validators\RecursiveIncludeValidator; test('recursive include detects issues', function () { $template = <<<'BLADE' @include('/tmp/file') BLADE; $results = Document::from...
php
MIT
d6df786667543d31a0fd45d90c8b78042625c4b4
2026-01-05T04:28:43.219923Z
false
Stillat/blade-parser
https://github.com/Stillat/blade-parser/blob/d6df786667543d31a0fd45d90c8b78042625c4b4/tests/Validation/BasicValidatorDetailsTest.php
tests/Validation/BasicValidatorDetailsTest.php
<?php uses(\Stillat\BladeParser\Tests\ParserTestCase::class); test('has validator class', function () { $validator = $this->getValidator()->withCoreValidators(); foreach (config('blade.validation.core_validators') as $className) { expect($validator->hasValidatorClass($className))->toBeTrue(); } })...
php
MIT
d6df786667543d31a0fd45d90c8b78042625c4b4
2026-01-05T04:28:43.219923Z
false
Stillat/blade-parser
https://github.com/Stillat/blade-parser/blob/d6df786667543d31a0fd45d90c8b78042625c4b4/tests/Validation/DirectiveArgumentSpacingTest.php
tests/Validation/DirectiveArgumentSpacingTest.php
<?php uses(\Stillat\BladeParser\Tests\ParserTestCase::class); use Stillat\BladeParser\Document\Document; use Stillat\BladeParser\Validation\Validators\DirectiveArgumentSpacingValidator; test('directive argument spacing validator detects issues', function () { $template = <<<'BLADE' @if ($something) @endif BLADE...
php
MIT
d6df786667543d31a0fd45d90c8b78042625c4b4
2026-01-05T04:28:43.219923Z
false
Stillat/blade-parser
https://github.com/Stillat/blade-parser/blob/d6df786667543d31a0fd45d90c8b78042625c4b4/tests/Validation/InconsistentIndentationLevelTest.php
tests/Validation/InconsistentIndentationLevelTest.php
<?php uses(\Stillat\BladeParser\Tests\ParserTestCase::class); use Stillat\BladeParser\Document\Document; use Stillat\BladeParser\Validation\Validators\InconsistentIndentationLevelValidator; test('inconsistent indentation level detects issues', function () { $template = <<<'BLADE' @if ($this) @endif BLADE...
php
MIT
d6df786667543d31a0fd45d90c8b78042625c4b4
2026-01-05T04:28:43.219923Z
false
Stillat/blade-parser
https://github.com/Stillat/blade-parser/blob/d6df786667543d31a0fd45d90c8b78042625c4b4/tests/Validation/DirectiveSpacingTest.php
tests/Validation/DirectiveSpacingTest.php
<?php uses(\Stillat\BladeParser\Tests\ParserTestCase::class); use Stillat\BladeParser\Document\Document; use Stillat\BladeParser\Validation\Validators\DirectiveSpacingValidator; test('directive spacing validator detects issues', function () { $template = 'class="@if @endif"'; $results = Document::fromText($te...
php
MIT
d6df786667543d31a0fd45d90c8b78042625c4b4
2026-01-05T04:28:43.219923Z
false
Stillat/blade-parser
https://github.com/Stillat/blade-parser/blob/d6df786667543d31a0fd45d90c8b78042625c4b4/tests/Validation/ComponentParameterNameSpacingTest.php
tests/Validation/ComponentParameterNameSpacingTest.php
<?php uses(\Stillat\BladeParser\Tests\ParserTestCase::class); use Stillat\BladeParser\Document\Document; use Stillat\BladeParser\Validation\Validators\ComponentParameterNameSpacingValidator; test('parameter spacing is detected', function () { $template = <<<'BLADE' <x-alert message = "The message" /> BLADE; $...
php
MIT
d6df786667543d31a0fd45d90c8b78042625c4b4
2026-01-05T04:28:43.219923Z
false
Stillat/blade-parser
https://github.com/Stillat/blade-parser/blob/d6df786667543d31a0fd45d90c8b78042625c4b4/tests/Validation/UnpairedConditionTest.php
tests/Validation/UnpairedConditionTest.php
<?php uses(\Stillat\BladeParser\Tests\ParserTestCase::class); use Stillat\BladeParser\Document\Document; use Stillat\BladeParser\Validation\Validators\UnpairedConditionValidator; test('unpaired condition validator detects issues', function () { $template = <<<'BLADE' @if ($this) @elseif ($that) BLADE; $resul...
php
MIT
d6df786667543d31a0fd45d90c8b78042625c4b4
2026-01-05T04:28:43.219923Z
false
Stillat/blade-parser
https://github.com/Stillat/blade-parser/blob/d6df786667543d31a0fd45d90c8b78042625c4b4/tests/Validation/InconsistentDirectiveCasingTest.php
tests/Validation/InconsistentDirectiveCasingTest.php
<?php uses(\Stillat\BladeParser\Tests\ParserTestCase::class); use Stillat\BladeParser\Document\Document; use Stillat\BladeParser\Validation\Validators\InconsistentDirectiveCasingValidator; test('inconsistent directive casing validator detects issues', function ($directiveName) { if ($directiveName == 'endverbatim...
php
MIT
d6df786667543d31a0fd45d90c8b78042625c4b4
2026-01-05T04:28:43.219923Z
false
Stillat/blade-parser
https://github.com/Stillat/blade-parser/blob/d6df786667543d31a0fd45d90c8b78042625c4b4/tests/Validation/RequiresOpenTest.php
tests/Validation/RequiresOpenTest.php
<?php uses(\Stillat\BladeParser\Tests\ParserTestCase::class); use Stillat\BladeParser\Document\Document; use Stillat\BladeParser\Validation\Validators\RequiresOpenValidator; test('requires open validator detects issues', function () { $message = 'Missing required opening directive for [@endfor]'; $results = D...
php
MIT
d6df786667543d31a0fd45d90c8b78042625c4b4
2026-01-05T04:28:43.219923Z
false
Stillat/blade-parser
https://github.com/Stillat/blade-parser/blob/d6df786667543d31a0fd45d90c8b78042625c4b4/tests/Validation/RequiredArgumentsTest.php
tests/Validation/RequiredArgumentsTest.php
<?php uses(\Stillat\BladeParser\Tests\ParserTestCase::class); use Stillat\BladeParser\Document\Document; use Stillat\BladeParser\Validation\Validators\RequiredArgumentsValidator; test('required arguments validator detects issues', function ($directiveName) { $message = "Required arguments missing for [@{$directiv...
php
MIT
d6df786667543d31a0fd45d90c8b78042625c4b4
2026-01-05T04:28:43.219923Z
false
Stillat/blade-parser
https://github.com/Stillat/blade-parser/blob/d6df786667543d31a0fd45d90c8b78042625c4b4/tests/Validation/EmptyConditionTest.php
tests/Validation/EmptyConditionTest.php
<?php uses(\Stillat\BladeParser\Tests\ParserTestCase::class); use Stillat\BladeParser\Document\Document; use Stillat\BladeParser\Validation\Validators\EmptyConditionValidator; test('empty condition validator detects issues', function () { $template = <<<'BLADE' @if @else @endif BLADE; $results = Document::...
php
MIT
d6df786667543d31a0fd45d90c8b78042625c4b4
2026-01-05T04:28:43.219923Z
false
Stillat/blade-parser
https://github.com/Stillat/blade-parser/blob/d6df786667543d31a0fd45d90c8b78042625c4b4/tests/Validation/SwitchTest.php
tests/Validation/SwitchTest.php
<?php uses(\Stillat\BladeParser\Tests\ParserTestCase::class); use Stillat\BladeParser\Document\Document; use Stillat\BladeParser\Validation\Validators\SwitchValidator; test('switch validator detects no case statements', function () { $template = <<<'BLADE' @switch ($var) @endswitch BLADE; $results = Document...
php
MIT
d6df786667543d31a0fd45d90c8b78042625c4b4
2026-01-05T04:28:43.219923Z
false
Stillat/blade-parser
https://github.com/Stillat/blade-parser/blob/d6df786667543d31a0fd45d90c8b78042625c4b4/tests/Structures/ComponentTagChildrenTest.php
tests/Structures/ComponentTagChildrenTest.php
<?php uses(\Stillat\BladeParser\Tests\ParserTestCase::class); use Stillat\BladeParser\Nodes\Components\ComponentNode; use Stillat\BladeParser\Nodes\DirectiveNode; use Stillat\BladeParser\Nodes\LiteralNode; test('basic component tag children', function () { $template = <<<'EOT' One <x-alert> One @include('test') T...
php
MIT
d6df786667543d31a0fd45d90c8b78042625c4b4
2026-01-05T04:28:43.219923Z
false
Stillat/blade-parser
https://github.com/Stillat/blade-parser/blob/d6df786667543d31a0fd45d90c8b78042625c4b4/tests/Structures/StructureQueryTest.php
tests/Structures/StructureQueryTest.php
<?php uses(\Stillat\BladeParser\Tests\ParserTestCase::class); use Stillat\BladeParser\Nodes\Structures\CaseStatement; use Stillat\BladeParser\Nodes\Structures\SwitchStatement; test('basic structure queries', function () { $template = <<<'EOT' @if ($something) @forelse($users as $user) @endforelse @...
php
MIT
d6df786667543d31a0fd45d90c8b78042625c4b4
2026-01-05T04:28:43.219923Z
false
Stillat/blade-parser
https://github.com/Stillat/blade-parser/blob/d6df786667543d31a0fd45d90c8b78042625c4b4/tests/Structures/ComponentPairingTest.php
tests/Structures/ComponentPairingTest.php
<?php uses(\Stillat\BladeParser\Tests\ParserTestCase::class); use Stillat\BladeParser\Nodes\Components\ComponentNode; test('basic component pairing', function () { $template = <<<'EOT' <div> <x-alert message="the message"> <p>Inner text.</p> </x-alert> </div> EOT; $doc = $this->getDocument($te...
php
MIT
d6df786667543d31a0fd45d90c8b78042625c4b4
2026-01-05T04:28:43.219923Z
false
Stillat/blade-parser
https://github.com/Stillat/blade-parser/blob/d6df786667543d31a0fd45d90c8b78042625c4b4/tests/Structures/DirectivePairTest.php
tests/Structures/DirectivePairTest.php
<?php uses(\Stillat\BladeParser\Tests\ParserTestCase::class); use Stillat\BladeParser\Nodes\DirectiveNode; test('basic directive pairing', function () { $template = <<<'EOT' @section ('section_name') @endsection EOT; $document = $this->getDocument($template); $document->resolveStructures(); $section...
php
MIT
d6df786667543d31a0fd45d90c8b78042625c4b4
2026-01-05T04:28:43.219923Z
false
Stillat/blade-parser
https://github.com/Stillat/blade-parser/blob/d6df786667543d31a0fd45d90c8b78042625c4b4/tests/Structures/ConditionStructureTest.php
tests/Structures/ConditionStructureTest.php
<?php uses(\Stillat\BladeParser\Tests\ParserTestCase::class); use Stillat\BladeParser\Nodes\DirectiveNode; use Stillat\BladeParser\Nodes\Structures\Condition; use Stillat\BladeParser\Nodes\Structures\ConditionalBranch; test('basic condition structures', function () { $template = <<<'EOT' One @if ($that == 'this')...
php
MIT
d6df786667543d31a0fd45d90c8b78042625c4b4
2026-01-05T04:28:43.219923Z
false
Stillat/blade-parser
https://github.com/Stillat/blade-parser/blob/d6df786667543d31a0fd45d90c8b78042625c4b4/tests/Structures/ForElseStructureTest.php
tests/Structures/ForElseStructureTest.php
<?php uses(\Stillat\BladeParser\Tests\ParserTestCase::class); use Stillat\BladeParser\Nodes\DirectiveNode; use Stillat\BladeParser\Nodes\EchoNode; use Stillat\BladeParser\Nodes\LiteralNode; use Stillat\BladeParser\Nodes\Structures\ForElse; test('for else structures', function () { $template = <<<'EOT' @forelse ($...
php
MIT
d6df786667543d31a0fd45d90c8b78042625c4b4
2026-01-05T04:28:43.219923Z
false
Stillat/blade-parser
https://github.com/Stillat/blade-parser/blob/d6df786667543d31a0fd45d90c8b78042625c4b4/tests/Structures/StructureDocumentsTest.php
tests/Structures/StructureDocumentsTest.php
<?php uses(\Stillat\BladeParser\Tests\ParserTestCase::class); use Stillat\BladeParser\Nodes\Components\ComponentNode; use Stillat\BladeParser\Nodes\DirectiveNode; test('directive pair structure documents', function () { $template = <<<'EOT' One @section ('section_name') Two @endsection Three EOT; $doc = $...
php
MIT
d6df786667543d31a0fd45d90c8b78042625c4b4
2026-01-05T04:28:43.219923Z
false
Stillat/blade-parser
https://github.com/Stillat/blade-parser/blob/d6df786667543d31a0fd45d90c8b78042625c4b4/tests/Structures/SwitchStructureTest.php
tests/Structures/SwitchStructureTest.php
<?php uses(\Stillat\BladeParser\Tests\ParserTestCase::class); use Stillat\BladeParser\Nodes\DirectiveNode; use Stillat\BladeParser\Nodes\LiteralNode; use Stillat\BladeParser\Nodes\Structures\CaseStatement; use Stillat\BladeParser\Nodes\Structures\SwitchStatement; test('basic switch statements', function () { $tem...
php
MIT
d6df786667543d31a0fd45d90c8b78042625c4b4
2026-01-05T04:28:43.219923Z
false
Stillat/blade-parser
https://github.com/Stillat/blade-parser/blob/d6df786667543d31a0fd45d90c8b78042625c4b4/tests/Structures/ConditionPairingTest.php
tests/Structures/ConditionPairingTest.php
<?php uses(\Stillat\BladeParser\Tests\ParserTestCase::class); use Illuminate\Support\Facades\Blade; use Stillat\BladeParser\Document\Structures\StructurePairAnalyzer; use Stillat\BladeParser\Nodes\DirectiveNode; test('basic condition pairing', function () { $template = <<<'EOT' @if ($something == true) @endif EO...
php
MIT
d6df786667543d31a0fd45d90c8b78042625c4b4
2026-01-05T04:28:43.219923Z
false
Stillat/blade-parser
https://github.com/Stillat/blade-parser/blob/d6df786667543d31a0fd45d90c8b78042625c4b4/tests/Structures/ParentNodesTest.php
tests/Structures/ParentNodesTest.php
<?php uses(\Stillat\BladeParser\Tests\ParserTestCase::class); use Stillat\BladeParser\Nodes\AbstractNode; use Stillat\BladeParser\Nodes\DirectiveNode; use Stillat\BladeParser\Nodes\LiteralNode; test('basic parent relationships', function () { $template = <<<'EOT' @if ('something') @include('something') Li...
php
MIT
d6df786667543d31a0fd45d90c8b78042625c4b4
2026-01-05T04:28:43.219923Z
false
Stillat/blade-parser
https://github.com/Stillat/blade-parser/blob/d6df786667543d31a0fd45d90c8b78042625c4b4/tests/Unit/ExampleTest.php
tests/Unit/ExampleTest.php
<?php test('example', function () { expect(true)->toBeTrue(); });
php
MIT
d6df786667543d31a0fd45d90c8b78042625c4b4
2026-01-05T04:28:43.219923Z
false
Stillat/blade-parser
https://github.com/Stillat/blade-parser/blob/d6df786667543d31a0fd45d90c8b78042625c4b4/tests/Documents/GeneralDocumentDetailsTest.php
tests/Documents/GeneralDocumentDetailsTest.php
<?php uses(\Stillat\BladeParser\Tests\ParserTestCase::class); use Stillat\BladeParser\Document\Document; use Stillat\BladeParser\Nodes\AbstractNode; test('file path can be set', function () { $document = Document::fromText('Simple template', 'resources/views/layout.validation.php'); expect($document->getFileP...
php
MIT
d6df786667543d31a0fd45d90c8b78042625c4b4
2026-01-05T04:28:43.219923Z
false
Stillat/blade-parser
https://github.com/Stillat/blade-parser/blob/d6df786667543d31a0fd45d90c8b78042625c4b4/tests/Examples/DocumentExampleTest.php
tests/Examples/DocumentExampleTest.php
<?php uses(\Stillat\BladeParser\Tests\ParserTestCase::class); use Stillat\BladeParser\Document\Document; use Stillat\BladeParser\Errors\ConstructContext; use Stillat\BladeParser\Errors\ErrorType; use Stillat\BladeParser\Nodes\AbstractNode; use Stillat\BladeParser\Nodes\DirectiveNode; use Stillat\BladeParser\Nodes\Echo...
php
MIT
d6df786667543d31a0fd45d90c8b78042625c4b4
2026-01-05T04:28:43.219923Z
false
Stillat/blade-parser
https://github.com/Stillat/blade-parser/blob/d6df786667543d31a0fd45d90c8b78042625c4b4/tests/ParserErrors/GeneralParserErrorsTest.php
tests/ParserErrors/GeneralParserErrorsTest.php
<?php uses(\Stillat\BladeParser\Tests\ParserTestCase::class); use Stillat\BladeParser\Errors\BladeError; use Stillat\BladeParser\Errors\ConstructContext; use Stillat\BladeParser\Errors\ErrorType; use Stillat\BladeParser\Errors\Exceptions\CompilationException; test('unmatched verbatim triggers error', function () { ...
php
MIT
d6df786667543d31a0fd45d90c8b78042625c4b4
2026-01-05T04:28:43.219923Z
false
Stillat/blade-parser
https://github.com/Stillat/blade-parser/blob/d6df786667543d31a0fd45d90c8b78042625c4b4/tests/__fixtures/workspaces/two/first.blade.php
tests/__fixtures/workspaces/two/first.blade.php
@include ('one') {{ $world }} @if ($this) @if ($this) @endif @endif {{-- Comment --}} @switch ($value) @case (1) @switch ($value) @default @break @endswitch @break @default @break @endswitch {{-- Comment --}} @verbatim @include ('one') @if...
php
MIT
d6df786667543d31a0fd45d90c8b78042625c4b4
2026-01-05T04:28:43.219923Z
false