assertEquals( 'localhost', $this->pingOnLocalhost()->getHostname() ); } public function testReturnsCorrectServiceDescription() { $this->assertEquals( 'ping <> pong', $this->pingOnLocalhost()->getServiceDescription() ); } public function testReturnsCorrectAlias() { $this->assertEquals( 'localhost: ping <> pong', $this->pingOnLocalhost()->getAlias() ); } public function testRendersCorrectLink() { $this->assertEquals( '' . 'localhost: ping <> pong', $this->pingOnLocalhost()->getLink()->render() ); } /** * @return ServiceNode */ protected function pingOnLocalhost() { $bp = new BpConfig(); return (new ServiceNode((object) array( 'hostname' => 'localhost', 'service' => 'ping <> pong', 'state' => 0, )))->setBpConfig($bp)->setHostAlias('localhost')->setAlias('ping <> pong'); } }