Skip to content

Commit

Permalink
fixes the line ending error on windows test (#54236)
Browse files Browse the repository at this point in the history
  • Loading branch information
AhmedAlaa4611 authored Jan 17, 2025
1 parent 66eeb82 commit ad20dd5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
5 changes: 4 additions & 1 deletion tests/Http/HttpClientTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -838,7 +838,10 @@ public function testSequenceBuilder()
$this->assertSame(200, $response->status());

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

$response = $this->factory->get('https://example.com');
Expand Down
8 changes: 4 additions & 4 deletions tests/View/Blade/BladeComponentsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ public function testComponentsAreCompiled()

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

public function testEndComponentsAreCompiled()
Expand All @@ -35,7 +35,7 @@ public function testEndComponentClassesAreCompiled()
{
$this->compiler->newComponentHash('foo');

$this->assertSame('<?php echo $__env->renderComponent(); ?>
$this->assertSame(str_replace("\r\n", "\n", '<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal79aef92e83454121ab6e5f64077e7d8a)): ?>
<?php $attributes = $__attributesOriginal79aef92e83454121ab6e5f64077e7d8a; ?>
Expand All @@ -44,7 +44,7 @@ public function testEndComponentClassesAreCompiled()
<?php if (isset($__componentOriginal79aef92e83454121ab6e5f64077e7d8a)): ?>
<?php $component = $__componentOriginal79aef92e83454121ab6e5f64077e7d8a; ?>
<?php unset($__componentOriginal79aef92e83454121ab6e5f64077e7d8a); ?>
<?php endif; ?>', $this->compiler->compileString('@endcomponentClass'));
<?php endif; ?>'), $this->compiler->compileString('@endcomponentClass'));
}

public function testSlotsAreCompiled()
Expand Down

0 comments on commit ad20dd5

Please sign in to comment.