Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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/Mail/MailMailerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ public function testMailerSendSendsMessageWithProperPlainViewContent()
rendered.view
Text;

$this->assertStringContainsString($expected, $sentMessage->toString());
$this->assertStringContainsString(str_replace("\r\n", "\n", $expected), $sentMessage->toString());

$expected = <<<Text
Content-Type: text/plain; charset=utf-8\r
Expand All @@ -154,7 +154,7 @@ public function testMailerSendSendsMessageWithProperPlainViewContent()
rendered.plain
Text;

$this->assertStringContainsString($expected, $sentMessage->toString());
$this->assertStringContainsString(str_replace("\r\n", "\n", $expected), $sentMessage->toString());
}

public function testMailerSendSendsMessageWithProperPlainViewContentWhenExplicit()
Expand All @@ -177,7 +177,7 @@ public function testMailerSendSendsMessageWithProperPlainViewContentWhenExplicit
rendered.view
Text;

$this->assertStringContainsString($expected, $sentMessage->toString());
$this->assertStringContainsString(str_replace("\r\n", "\n", $expected), $sentMessage->toString());

$expected = <<<Text
Content-Type: text/plain; charset=utf-8\r
Expand All @@ -186,7 +186,7 @@ public function testMailerSendSendsMessageWithProperPlainViewContentWhenExplicit
rendered.plain
Text;

$this->assertStringContainsString($expected, $sentMessage->toString());
$this->assertStringContainsString(str_replace("\r\n", "\n", $expected), $sentMessage->toString());
}

public function testToAllowsEmailAndName()
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
Loading