2017-10-18 01:32:08 +02:00
|
|
|
<?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();
|
2021-10-27 23:40:52 +02:00
|
|
|
$this->assertStringNotContainsString('some invalid string', $css);
|
|
|
|
$this->assertStringContainsString(
|
2017-10-18 01:32:08 +02:00
|
|
|
'tests/php/Controllers/LeftAndMainPageIconsExtensionTest/icon_b.jpg?m=',
|
|
|
|
$css
|
|
|
|
);
|
2021-10-27 23:40:52 +02:00
|
|
|
$this->assertStringContainsString(
|
2017-10-18 01:32:08 +02:00
|
|
|
'tests/php/Controllers/LeftAndMainPageIconsExtensionTest/icon_c.jpg?m=',
|
|
|
|
$css
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|