Skip to content

Commit 7efc657

Browse files
committed
fix tests
1 parent 33461dc commit 7efc657

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/Illuminate/View/Compilers/ComponentTagCompiler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ protected function partitionDataAndAttributes($class, array $attributes)
257257
*/
258258
protected function compileClosingTags(string $value)
259259
{
260-
return preg_replace("/<\/\s*x[-\:][\w\-\:\.]*\s*>/", '@endcomponentClass', $value);
260+
return preg_replace("/<\/\s*x[-\:][\w\-\:\.]*\s*>/", ' @endcomponentClass', $value);
261261
}
262262

263263
/**

tests/View/Blade/BladeComponentTagCompilerTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,23 +49,23 @@ public function testDataCamelCasing()
4949
$result = (new ComponentTagCompiler(['profile' => TestProfileComponent::class]))->compileTags('<x-profile user-id="1"></x-profile>');
5050

5151
$this->assertEquals("@component('Illuminate\Tests\View\Blade\TestProfileComponent', ['userId' => '1'])
52-
<?php \$component->withAttributes([]); ?>@endcomponentClass", trim($result));
52+
<?php \$component->withAttributes([]); ?> @endcomponentClass", trim($result));
5353
}
5454

5555
public function testColonNestedComponentParsing()
5656
{
5757
$result = (new ComponentTagCompiler(['foo:alert' => TestAlertComponent::class]))->compileTags('<x-foo:alert></x-foo:alert>');
5858

5959
$this->assertEquals("@component('Illuminate\Tests\View\Blade\TestAlertComponent', [])
60-
<?php \$component->withAttributes([]); ?>@endcomponentClass", trim($result));
60+
<?php \$component->withAttributes([]); ?> @endcomponentClass", trim($result));
6161
}
6262

6363
public function testColonStartingNestedComponentParsing()
6464
{
6565
$result = (new ComponentTagCompiler(['foo:alert' => TestAlertComponent::class]))->compileTags('<x:foo:alert></x-foo:alert>');
6666

6767
$this->assertEquals("@component('Illuminate\Tests\View\Blade\TestAlertComponent', [])
68-
<?php \$component->withAttributes([]); ?>@endcomponentClass", trim($result));
68+
<?php \$component->withAttributes([]); ?> @endcomponentClass", trim($result));
6969
}
7070

7171
public function testSelfClosingComponentsCanBeCompiled()
@@ -139,7 +139,7 @@ public function testPairedComponentTags()
139139

140140
$this->assertEquals("@component('Illuminate\Tests\View\Blade\TestAlertComponent', [])
141141
<?php \$component->withAttributes([]); ?>
142-
@endcomponentClass", trim($result));
142+
@endcomponentClass", trim($result));
143143
}
144144

145145
public function testClasslessComponents()

0 commit comments

Comments
 (0)