assertEquals(__DIR__ . '/static/../icons', config('icon_dir')); } public function test_page_path() { $page = page_path('home'); $this->assertEquals('/home.html', $page); } public function test_escape() { $output = escape("'\"&"); $this->assertEquals("'"&", $output); } public function test_icon() { load_config(__DIR__ . '/static/config.php'); $icon = icon('test'); $this->assertFalse(empty($icon)); $this->assertEquals("\n", $icon); } public function test_code_table() { $php = file_get_contents(__DIR__ . '/static/code_table.php'); $expectedOutput = file_get_contents(__DIR__ . '/static/code_table.html'); $html = code_table($php); $this->assertFalse(empty($html)); $this->assertEquals($expectedOutput, $html . "\n"); } public function test_partial() { partial('partial', ['test' => 'test var']); $this->assertEquals('test var', $GLOBALS['PARTIAL_TEST']); } }