public function getOutput() { $protocol = new Protocol($this->_request); $host = new Host($this->_request); $directory = new Directory($this->_request); /* collect output */ $output = $protocol->getOutput() . '://' . $host->getOutput(); if ($directory->getOutput() !== '/' && $directory->getOutput() !== '\\') { $output .= $directory->getOutput(); } return $output; }
/** * testRoot * * @since 2.4.0 */ public function testRoot() { /* setup */ $root = new Server\Root($this->_request); /* actual */ $actual = $root->getOutput(); /* compare */ $this->assertEquals('http://localhost/tests/includes/Server', $actual); }