Source of file LeftAndMainPageIconsExtensionTest.php
Size: 1,007 Bytes - Last Modified: 2021-12-23T10:28:18+00:00
/var/www/docs.ssmods.com/process/src/tests/php/Controllers/LeftAndMainPageIconsExtensionTest.php
12345678910111213141516171819202122232425262728293031 | <?php namespace SilverStripe\CMS\Tests\Controllers; use SilverStripe\CMS\Controllers\LeftAndMainPageIconsExtension; use SilverStripe\Dev\SapphireTest; class LeftAndMainPageIconsExtensionTest extends SapphireTest { protected static $extra_dataobjects = [ LeftAndMainPageIconsExtensionTest\ModuleIconA::class, LeftAndMainPageIconsExtensionTest\ModuleIconB::class, LeftAndMainPageIconsExtensionTest\ModuleIconC::class, ]; public function testGenerateIconCSS() { $extension = new LeftAndMainPageIconsExtension(); $css = $extension->generatePageIconsCss(); $this->assertStringNotContainsString('some invalid string', $css); $this->assertStringContainsString( 'tests/php/Controllers/LeftAndMainPageIconsExtensionTest/icon_b.jpg?m=', $css ); $this->assertStringContainsString( 'tests/php/Controllers/LeftAndMainPageIconsExtensionTest/icon_c.jpg?m=', $css ); } } |