', null, '"<a>"'), array('&', null, '"&amp;"'), array('"hello"', null, "'\"hello\"'"), array("'hello'", null, "\"'hello'\""), array("\"'", null, "\""'\""), array("a\nb", null, '"a b"'), array("a\r\nb", null, '"a b"'), array("a\tb", null, '"a b"'), array('a b', null, '"a b"'), array('"a 'z'), '"zoo"'), array('', array('a' => '&'), '"<&>"'), ); } /** * @dataProvider quoteattr_test_data */ public function test_quoteattr($input, $entities, $expected) { $output = phpbb_quoteattr($input, $entities); $this->assertEquals($expected, $output); } }