assertSame('Hello Taylor', Blade::render('Hello {{ $name }}', ['name' => 'Taylor']));
}
public function test_rendering_blade_long_maxpathlen_string()
{
$longString = str_repeat('a', PHP_MAXPATHLEN);
$result = Blade::render($longString.'{{ $name }}', ['name' => 'a']);
$this->assertSame($longString.'a', $result);
}
public function test_rendering_blade_component_instance()
{
$component = new HelloComponent('Taylor');
$this->assertSame('Hello Taylor', Blade::renderComponent($component));
}
public function test_basic_blade_rendering()
{
$view = View::make('hello', ['name' => 'Taylor'])->render();
$this->assertSame('Hello Taylor', trim($view));
}
public function test_rendering_a_component()
{
$view = View::make('uses-panel', ['name' => 'Taylor'])->render();
$this->assertSame('
Hello Taylor
', trim($view));
}
public function test_rendering_a_dynamic_component()
{
$view = View::make('uses-panel-dynamically', ['name' => 'Taylor'])->render();
$this->assertSame('
Hello Taylor
', trim($view));
}
public function test_rendering_the_same_dynamic_component_with_different_attributes()
{
$view = View::make('varied-dynamic-calls')->render();
$this->assertSame('
Hello Taylor
Hello Samuel
', trim($view));
}
public function test_inline_link_type_attributes_dont_add_extra_spacing_at_end()
{
$view = View::make('uses-link')->render();
$this->assertSame('This is a sentence with a link.', trim($view));
}
public function test_appendable_attributes()
{
$view = View::make('uses-appendable-panel', ['name' => 'Taylor', 'withInjectedValue' => true])->render();
$this->assertSame('