public function getHost()
{
if (null === $this->host) {
throw new \DomainException('A host is required');
}
return $this->host;
}
/** * @covers DragonBe\Vies\HeartBeat::__construct */ public function testCanOverrideSettingsAtConstruct() { $host = 'www.example.com'; $port = 8080; $hb = new HeartBeat($host, $port); $this->assertSame($host, $hb->getHost()); $this->assertSame($port, $hb->getPort()); }