Skip to content

Commit ad20dd5

Browse files
fixes the line ending error on windows test (#54236)
1 parent 66eeb82 commit ad20dd5

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

tests/Http/HttpClientTest.php

+4-1
Original file line numberDiff line numberDiff line change
@@ -838,7 +838,10 @@ public function testSequenceBuilder()
838838
$this->assertSame(200, $response->status());
839839

840840
$response = $this->factory->get('https://example.com');
841-
$this->assertSame("This is a story about something that happened long ago when your grandfather was a child.\n", $response->body());
841+
$this->assertSame(
842+
"This is a story about something that happened long ago when your grandfather was a child.\n",
843+
str_replace("\r\n", "\n", $response->body())
844+
);
842845
$this->assertSame(200, $response->status());
843846

844847
$response = $this->factory->get('https://example.com');

tests/View/Blade/BladeComponentsTest.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ public function testComponentsAreCompiled()
1616

1717
public function testClassComponentsAreCompiled()
1818
{
19-
$this->assertSame('<?php if (isset($component)) { $__componentOriginal2dda3d2f2f9b76bd400bf03f0b84e87f = $component; } ?>
19+
$this->assertSame(str_replace("\r\n", "\n", '<?php if (isset($component)) { $__componentOriginal2dda3d2f2f9b76bd400bf03f0b84e87f = $component; } ?>
2020
<?php if (isset($attributes)) { $__attributesOriginal2dda3d2f2f9b76bd400bf03f0b84e87f = $attributes; } ?>
2121
<?php $component = Illuminate\Tests\View\Blade\ComponentStub::class::resolve(["foo" => "bar"] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
2222
<?php $component->withName(\'test\'); ?>
2323
<?php if ($component->shouldRender()): ?>
24-
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>', $this->compiler->compileString('@component(\'Illuminate\Tests\View\Blade\ComponentStub::class\', \'test\', ["foo" => "bar"])'));
24+
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>'), $this->compiler->compileString('@component(\'Illuminate\Tests\View\Blade\ComponentStub::class\', \'test\', ["foo" => "bar"])'));
2525
}
2626

2727
public function testEndComponentsAreCompiled()
@@ -35,7 +35,7 @@ public function testEndComponentClassesAreCompiled()
3535
{
3636
$this->compiler->newComponentHash('foo');
3737

38-
$this->assertSame('<?php echo $__env->renderComponent(); ?>
38+
$this->assertSame(str_replace("\r\n", "\n", '<?php echo $__env->renderComponent(); ?>
3939
<?php endif; ?>
4040
<?php if (isset($__attributesOriginal79aef92e83454121ab6e5f64077e7d8a)): ?>
4141
<?php $attributes = $__attributesOriginal79aef92e83454121ab6e5f64077e7d8a; ?>
@@ -44,7 +44,7 @@ public function testEndComponentClassesAreCompiled()
4444
<?php if (isset($__componentOriginal79aef92e83454121ab6e5f64077e7d8a)): ?>
4545
<?php $component = $__componentOriginal79aef92e83454121ab6e5f64077e7d8a; ?>
4646
<?php unset($__componentOriginal79aef92e83454121ab6e5f64077e7d8a); ?>
47-
<?php endif; ?>', $this->compiler->compileString('@endcomponentClass'));
47+
<?php endif; ?>'), $this->compiler->compileString('@endcomponentClass'));
4848
}
4949

5050
public function testSlotsAreCompiled()

0 commit comments

Comments
 (0)