3
0
mirror of https://github.com/snipe/snipe-it.git synced 2026-02-16 08:55:57 +00:00

Merge pull request #15705 from marcusmoore/tests/icon-component-test

Added test to ensure icon component does not end in newline
This commit is contained in:
snipe
2024-10-22 11:46:04 +01:00
committed by GitHub

View 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.'
);
}
}