1 | <?php |
||
6 | use SilverStripe\Dev\SapphireTest; |
||
7 | use SilverStripe\Core\Config\Config; |
||
8 | |||
9 | /** |
||
10 | * @package simple-styleguide |
||
11 | * @subpackage tests |
||
12 | */ |
||
13 | class SimpleStyleguideControllerTest extends SapphireTest |
||
14 | { |
||
15 | protected static $fixture_file = 'SimpleStyleguideControllerTest.yml'; |
||
16 | |||
17 | protected $requiredExtensions = [ |
||
18 | SimpleStyleguideController::class => [ |
||
19 | SimpleStyleguideControllerTest_data::class |
||
20 | ], |
||
21 | ]; |
||
22 | |||
23 | public function testGetStyleguideData() |
||
38 | |||
39 | public function testGetStyleguideDataExtension() |
||
50 | |||
51 | public function testGetTestForm() |
||
58 | |||
59 | public function testGetContent() |
||
67 | |||
68 | public function testGetColorSwatches() |
||
69 | { |
||
70 | $controller = SimpleStyleguideController::create(); |
||
71 | $swatchesFixture = [ |
||
72 | [ |
||
73 | 'Name' => 'Black', |
||
74 | 'Description' => 'This color is rather dark', |
||
75 | 'CSSColor' => '#000000', |
||
76 | 'TextColor' => '#ffffff', |
||
77 | ], |
||
78 | [ |
||
79 | 'Name' => 'Grey', |
||
80 | 'Description' => 'This color is grey', |
||
81 | 'CSSColor' => '#666666', |
||
95 |