A boy went home to see his mother. This involved a short journey, as well as some space travel and unquoted events, as well as a single quote from his father.
There were also some elements with extra attributes which played a part in his journey. HE ALSO DISCOVERED THE KEY. Later he got his mixed up.
'; $expected = array ( '/', 'home/', 'mother/', '$Journey', 'space travel', 'unquoted', 'single quote', '/father', 'attributes', 'journey', 'CAPS LOCK', 'quotes \'mixed\' up' ); $result = HTTP::getLinksIn($content); // Results don't neccesarily come out in the order they are in the $content param. sort($result); sort($expected); $this->assertTrue(is_array($result)); $this->assertEquals($expected, $result, 'Test that all links within the content are found.'); } /** * Tests {@link HTTP::setGetVar()} */ public function testSetGetVar() { $expected = array ( '/?foo=bar' => array('foo', 'bar', '/'), '/?baz=buz&foo=bar' => array('foo', 'bar', '/?baz=buz'), '/?buz=baz&foo=baz' => array('foo', 'baz', '/?foo=bar&buz=baz'), '/?foo=var' => array('foo', 'var', '/?foo=&foo=bar'), '/?foo[test]=var' => array('foo[test]', 'var', '/?foo[test]=another') ); foreach($expected as $result => $args) { $this->assertEquals( call_user_func_array(array('HTTP', 'setGetVar'), $args), str_replace('&', '&', $result) ); } } }