| 1 |
<?php |
| 2 |
|
| 3 |
use PHPUnit\Framework\TestCase; |
| 4 |
|
| 5 |
class ScssMenuMapperTest extends TestCase { |
| 6 |
|
| 7 |
public function setUp() { |
| 8 |
$this->collection = new ResponsiveMenu\Collections\OptionsCollection; |
| 9 |
$this->collection->add(new ResponsiveMenu\Models\Option('breakpoint', 111)); |
| 10 |
$this->collection->add(new ResponsiveMenu\Models\Option('menu_close_on_body_click', 'on')); |
| 11 |
$this->collection->add(new ResponsiveMenu\Models\Option('page_wrapper', '#wrapper')); |
| 12 |
$this->collection->add(new ResponsiveMenu\Models\Option('animation_speed', 222)); |
| 13 |
$this->collection->add(new ResponsiveMenu\Models\Option('menu_width', 333)); |
| 14 |
$this->collection->add(new ResponsiveMenu\Models\Option('menu_appear_from', 'left')); |
| 15 |
$this->collection->add(new ResponsiveMenu\Models\Option('menu_background_colour', '#ffffff')); |
| 16 |
$this->collection->add(new ResponsiveMenu\Models\Option('menu_text_alignment', 'right')); |
| 17 |
$this->collection->add(new ResponsiveMenu\Models\Option('menu_additional_content_colour', '#ffffff')); |
| 18 |
$this->collection->add(new ResponsiveMenu\Models\Option('menu_search_box_background_colour', '#ffffff')); |
| 19 |
$this->collection->add(new ResponsiveMenu\Models\Option('menu_search_box_border_colour', '#ffffff')); |
| 20 |
$this->collection->add(new ResponsiveMenu\Models\Option('menu_search_box_text_colour', '#ffffff')); |
| 21 |
$this->collection->add(new ResponsiveMenu\Models\Option('menu_search_box_placholder_colour', '#ffffff')); |
| 22 |
$this->collection->add(new ResponsiveMenu\Models\Option('menu_maximum_width', 444)); |
| 23 |
$this->collection->add(new ResponsiveMenu\Models\Option('menu_minimum_width', 555)); |
| 24 |
$this->collection->add(new ResponsiveMenu\Models\Option('menu_font', 'Arial')); |
| 25 |
$this->collection->add(new ResponsiveMenu\Models\Option('transition_speed', 777)); |
| 26 |
$this->collection->add(new ResponsiveMenu\Models\Option('menu_title_background_colour', '#ffffff')); |
| 27 |
$this->collection->add(new ResponsiveMenu\Models\Option('menu_title_colour', '#ffffff')); |
| 28 |
$this->collection->add(new ResponsiveMenu\Models\Option('menu_title_font_size', 888)); |
| 29 |
$this->collection->add(new ResponsiveMenu\Models\Option('menu_title_hover_colour', '#ffffff')); |
| 30 |
$this->collection->add(new ResponsiveMenu\Models\Option('menu_title_background_hover_colour', '#ffffff')); |
| 31 |
$this->collection->add(new ResponsiveMenu\Models\Option('menu_font_size', 999)); |
| 32 |
$this->collection->add(new ResponsiveMenu\Models\Option('menu_links_height', 1000)); |
| 33 |
$this->collection->add(new ResponsiveMenu\Models\Option('menu_item_border_colour', '#ffffff')); |
| 34 |
$this->collection->add(new ResponsiveMenu\Models\Option('menu_link_colour', '#ffffff')); |
| 35 |
$this->collection->add(new ResponsiveMenu\Models\Option('menu_item_background_colour', '#ffffff')); |
| 36 |
$this->collection->add(new ResponsiveMenu\Models\Option('menu_link_hover_colour', '#ffffff')); |
| 37 |
$this->collection->add(new ResponsiveMenu\Models\Option('menu_item_background_hover_colour', '#ffffff')); |
| 38 |
$this->collection->add(new ResponsiveMenu\Models\Option('menu_item_border_colour_hover', '#ffffff')); |
| 39 |
$this->collection->add(new ResponsiveMenu\Models\Option('menu_sub_arrow_shape_hover_colour', '#ffffff')); |
| 40 |
$this->collection->add(new ResponsiveMenu\Models\Option('menu_sub_arrow_border_hover_colour', '#ffffff')); |
| 41 |
$this->collection->add(new ResponsiveMenu\Models\Option('menu_sub_arrow_background_hover_colour', '#ffffff')); |
| 42 |
$this->collection->add(new ResponsiveMenu\Models\Option('arrow_position', 'left')); |
| 43 |
$this->collection->add(new ResponsiveMenu\Models\Option('submenu_arrow_height', 2000)); |
| 44 |
$this->collection->add(new ResponsiveMenu\Models\Option('submenu_arrow_width', 3000)); |
| 45 |
$this->collection->add(new ResponsiveMenu\Models\Option('menu_sub_arrow_shape_colour', '#ffffff')); |
| 46 |
$this->collection->add(new ResponsiveMenu\Models\Option('menu_sub_arrow_border_colour', '#ffffff')); |
| 47 |
$this->collection->add(new ResponsiveMenu\Models\Option('menu_sub_arrow_background_colour', '#ffffff')); |
| 48 |
$this->collection->add(new ResponsiveMenu\Models\Option('menu_current_item_background_colour', '#ffffff')); |
| 49 |
$this->collection->add(new ResponsiveMenu\Models\Option('menu_current_link_colour', '#ffffff')); |
| 50 |
$this->collection->add(new ResponsiveMenu\Models\Option('menu_current_item_border_colour', '#ffffff')); |
| 51 |
$this->collection->add(new ResponsiveMenu\Models\Option('menu_current_item_background_hover_colour', '#ffffff')); |
| 52 |
$this->collection->add(new ResponsiveMenu\Models\Option('menu_current_link_hover_colour', '#ffffff')); |
| 53 |
$this->collection->add(new ResponsiveMenu\Models\Option('menu_current_item_border_hover_colour', '#ffffff')); |
| 54 |
$this->collection->add(new ResponsiveMenu\Models\Option('menu_to_hide', '#tohide')); |
| 55 |
$this->scss = new scssc_free; |
| 56 |
$this->mapper = new ResponsiveMenu\Mappers\ScssMenuMapper($this->scss); |
| 57 |
} |
| 58 |
|
| 59 |
public function testThis() { |
| 60 |
$mapped = $this->mapper->map($this->collection); |
| 61 |
$this->assertContains('width: 333%;', $mapped); |
| 62 |
$this->assertContains('max-width: 444px;', $mapped); |
| 63 |
$this->assertContains('min-width: 555px;', $mapped); |
| 64 |
|
| 65 |
} |
| 66 |
|
| 67 |
} |
| 68 |
|