public function testGetCurrentURLPort80()
{
$gen = $this->getMock('Happyr\\LinkedIn\\Http\\UrlGenerator', ['getHttpProtocol', 'getHttpHost', 'dropLinkedInParams'], []);
$gen->expects($this->any())->method('getHttpProtocol')->will($this->returnValue('http'));
$gen->expects($this->any())->method('getHttpHost')->will($this->returnValue('www.test.com:80'));
$gen->expects($this->any())->method('dropLinkedInParams')->will($this->returnCallback(function ($arg) {
return empty($arg) ? '' : '?' . $arg;
}));
//test port 80
$_SERVER['REQUEST_URI'] = '/foobar.php';
$this->assertEquals('http://www.test.com/foobar.php', $gen->getCurrentUrl(), 'port 80 should not be shown');
}