public function testStringEscape() { // Arrange $app = new App(); $string = "<a>some string</a>"; // Act $result = $app->escape($string); // Assert $this->assertEquals("<a>some string</a>", $result); }
/** * @covers \Phix\App::escape */ public function testEscape() { $valuesExpected = array('string' => 'string', '<' => '<', '>' => '>', '\'' => '\'', '"' => '"', '&' => '&', '<' => '<', '>' => '>', '"' => '"', '&' => '&'); $app = new App(); foreach ($valuesExpected as $input => $output) { $this->assertEquals($output, $app->escape($input)); } }