public function testGetPortWithUrl() { $port = 10000; $url = $this->getMock('Versionable\\Prospect\\Url\\UrlInterface', array(), array('http://testing.com')); $url->expects($this->any())->method('getPort')->will($this->returnValue($port)); $this->object->setUrl($url); $this->assertEquals($port, $this->object->getPort()); }
public function test__toString() { $request = new Request(); $request->setUrl(new Url('http://www.versionable.co.uk')); $this->object->setRequest($request); $this->assertEquals($this->object->toString(), (string) $this->object); }