| 1 |
<?php |
| 2 |
|
| 3 |
use PHPUnit\Framework\TestCase; |
| 4 |
|
| 5 |
class JsonFilterTest extends TestCase { |
| 6 |
|
| 7 |
public function setUp() { |
| 8 |
$this->filter = new ResponsiveMenu\Filters\JsonFilter; |
| 9 |
} |
| 10 |
|
| 11 |
public function testFilteredWithString() { |
| 12 |
$this->assertEquals('{"a":1,"b":2}', $this->filter->filter('{"a":1,"b":2}')); |
| 13 |
} |
| 14 |
|
| 15 |
public function testFilteredWithArray() { |
| 16 |
$this->assertEquals('{"a":1,"b":2}', $this->filter->filter(['a' => 1, 'b' => 2])); |
| 17 |
} |
| 18 |
|
| 19 |
} |
| 20 |
|