| 1 |
<?php |
| 2 |
|
| 3 |
use PHPUnit\Framework\TestCase; |
| 4 |
|
| 5 |
class ScssBaseMapperTest extends TestCase { |
| 6 |
|
| 7 |
public function setUp() { |
| 8 |
$this->collection = new ResponsiveMenu\Collections\OptionsCollection; |
| 9 |
$this->scss = new scssc_free; |
| 10 |
$this->mapper = new ResponsiveMenu\Mappers\ScssBaseMapper($this->scss); |
| 11 |
} |
| 12 |
|
| 13 |
public function testThis() { |
| 14 |
$this->collection->add(new ResponsiveMenu\Models\Option('breakpoint', 6000)); |
| 15 |
$this->collection->add(new ResponsiveMenu\Models\Option('menu_text_alignment', 'right')); |
| 16 |
$mapped = $this->mapper->map($this->collection); |
| 17 |
$mapped = $this->mapper->map($this->collection); |
| 18 |
$this->assertContains('max-width: 6000px)', $mapped); |
| 19 |
$this->assertContains('padding-right: 10%', $mapped); |
| 20 |
$this->assertContains('padding-right: 15%', $mapped); |
| 21 |
} |
| 22 |
|
| 23 |
public function testThat() { |
| 24 |
$this->collection->add(new ResponsiveMenu\Models\Option('breakpoint', 3000)); |
| 25 |
$this->collection->add(new ResponsiveMenu\Models\Option('menu_text_alignment', 'left')); |
| 26 |
$mapped = $this->mapper->map($this->collection); |
| 27 |
$this->assertContains('max-width: 3000px)', $mapped); |
| 28 |
$this->assertContains('padding-left: 10%', $mapped); |
| 29 |
$this->assertContains('padding-left: 15%', $mapped); |
| 30 |
} |
| 31 |
|
| 32 |
} |
| 33 |
|