A free open source IT asset/license management system
Add test to ensure icon component does not end in newline
Marcus Moore3f79fd7ea744
diff --git a/tests/Unit/BladeComponents/IconComponentTest.php b/tests/Unit/BladeComponents/IconComponentTest.phpnew file mode 100644index 0000000000..b418b38384--- /dev/null+++ b/tests/Unit/BladeComponents/IconComponentTest.php@@ -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.'+ );+ }+}