diff --git a/src/Tokenizer/Tokens/Token.php b/src/Tokenizer/Tokens/Token.php index 39597364..51847047 100644 --- a/src/Tokenizer/Tokens/Token.php +++ b/src/Tokenizer/Tokens/Token.php @@ -5,6 +5,6 @@ abstract class Token { abstract public function getType(): string; - + abstract public function toArray(): array; -} \ No newline at end of file +} diff --git a/tests/BenchmarkTest.php b/tests/BenchmarkTest.php index 7044728b..e52eec36 100644 --- a/tests/BenchmarkTest.php +++ b/tests/BenchmarkTest.php @@ -1,8 +1,6 @@ toBeTrue(); -})->skip(); \ No newline at end of file +}); diff --git a/tests/BlazeTest.php b/tests/BlazeTest.php index bc4c7a31..0fd314db 100644 --- a/tests/BlazeTest.php +++ b/tests/BlazeTest.php @@ -7,7 +7,7 @@ // Configure Blade to find our test components and views app('blade.compiler')->anonymousComponentNamespace('', 'x'); app('blade.compiler')->anonymousComponentPath(__DIR__ . '/fixtures/components'); - + // Add view path for our test pages View::addLocation(__DIR__ . '/fixtures/pages'); }); @@ -22,18 +22,18 @@ '; - + $rendered = \Illuminate\Support\Facades\Blade::render($template); - + // Pure components should be folded to optimized HTML expect($rendered)->toContain(''); expect($rendered)->toContain('
'); expect($rendered)->toContain('
Success!
'); - + expect($rendered)->not->toContain(''); expect($rendered)->not->toContain(''); expect($rendered)->not->toContain('toContain('
'); expect($rendered)->toContain('

Integration Test

'); @@ -42,11 +42,11 @@ it('leaves non-pure components unchanged through blade facade', function () { $template = '
Test Button
'; $rendered = \Illuminate\Support\Facades\Blade::render($template); - + // Non-pure component should render normally (not folded) expect($rendered)->toContain(''); expect($rendered)->not->toContain(''); - + // Just verify it renders normally }); @@ -58,7 +58,7 @@ it('preserves slot content when folding components', function () { $template = '

Dynamic Title

Dynamic content with emphasis

'; $rendered = \Illuminate\Support\Facades\Blade::render($template); - + // Should preserve all slot content in folded output expect($rendered)->toContain('

Dynamic Title

'); expect($rendered)->toContain('

Dynamic content with emphasis

'); @@ -66,4 +66,4 @@ expect($rendered)->not->toContain(''); }); -}); \ No newline at end of file +}); diff --git a/tests/InfiniteRecursionTest.php b/tests/InfiniteRecursionTest.php index 58f2c22e..b9b35f52 100644 --- a/tests/InfiniteRecursionTest.php +++ b/tests/InfiniteRecursionTest.php @@ -1,7 +1,5 @@ Submit'; - + // This should complete without hanging or crashing $rendered = \Illuminate\Support\Facades\Blade::render($template); - + expect($rendered)->toContain('toContain('type="submit"'); expect($rendered)->toContain('class="btn-primary"'); @@ -24,10 +22,10 @@ it('should handle nested pure components without infinite recursion', function () { $template = ''; - + // This should complete without hanging or crashing $rendered = \Illuminate\Support\Facades\Blade::render($template); - + expect($rendered)->toContain('
'); expect($rendered)->toContain('
'); expect($rendered)->toContain('Nested alert!'); @@ -42,10 +40,10 @@ Button 2 '; - + // This should complete without hanging or crashing $rendered = \Illuminate\Support\Facades\Blade::render($template); - + expect($rendered)->toContain('
'); expect($rendered)->toContain('Button 1'); expect($rendered)->toContain('Button 2'); @@ -69,10 +67,10 @@ Outer Button
'; - + // This should complete without hanging or crashing $rendered = \Illuminate\Support\Facades\Blade::render($template); - + expect($rendered)->toContain('
'); expect($rendered)->toContain('

Outer Card

'); expect($rendered)->toContain('

Inner Card

'); @@ -94,10 +92,10 @@ class="btn-primary btn-large" aria-label="Save changes"> Save Changes '; - + // This should complete without hanging or crashing $rendered = \Illuminate\Support\Facades\Blade::render($template); - + expect($rendered)->toContain('toContain('type="submit"'); expect($rendered)->toContain('class="btn-primary btn-large"'); @@ -110,12 +108,12 @@ class="btn-primary btn-large" it('should handle edge case with quotes and special characters', function () { // Test edge case that might trigger recursion issues $template = 'Complex'; - + // This should complete without hanging or crashing $rendered = \Illuminate\Support\Facades\Blade::render($template); - + expect($rendered)->toContain('toContain('Complex'); expect($rendered)->not->toContain('