getMock('Fetcher', array('get_data'), array(), '', false); $mock_fetcher->expects($this->at(0)) ->method('get_data') ->with('http://www.test.com/subdir/test1.css') ->will($this->returnValue(null)); $mock_fetcher->expects($this->at(1)) ->method('get_data') ->with('http://www.test.com/subdir/test2/test2.css') ->will($this->returnValue(null)); $mock_fetcher->expects($this->at(2)) ->method('get_data') ->with('http://www.test.com/test3/test3.css') ->will($this->returnValue(null)); $pipeline = new Pipeline(); $pipeline->configure(array('renderimages' => true)); $pipeline->push_base_url('http://www.test.com/subdir/test.html'); $pipeline->fetchers[] = $mock_fetcher; $pipeline->scan_styles($tree); } } ?>