mirror of
https://github.com/snipe/snipe-it.git
synced 2025-02-02 08:21:09 -08:00
Add test to ensure icon component does not end in newline
This commit is contained in:
parent
46ad1d072f
commit
3f79fd7ea7
20
tests/Unit/BladeComponents/IconComponentTest.php
Normal file
20
tests/Unit/BladeComponents/IconComponentTest.php
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Tests\Unit\BladeComponents;
|
||||||
|
|
||||||
|
use Illuminate\Support\Facades\View;
|
||||||
|
use Illuminate\Support\Str;
|
||||||
|
use Tests\TestCase;
|
||||||
|
|
||||||
|
class IconComponentTest extends TestCase
|
||||||
|
{
|
||||||
|
public function testIconComponentDoesNotEndInNewline()
|
||||||
|
{
|
||||||
|
$renderedTemplateString = View::make('blade.icon', ['type' => 'checkout'])->render();
|
||||||
|
|
||||||
|
$this->assertFalse(
|
||||||
|
Str::endsWith($renderedTemplateString, PHP_EOL),
|
||||||
|
'Newline found at end of icon component. Bootstrap tables will not render if there is a newline at the end of the file.'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue