public function getBaseDirectory($directoryToAppend = null) { $baseDirectory = $this->getNamingDirectory()->search('php:env/baseDirectory'); if ($directoryToAppend != null) { $baseDirectory .= $directoryToAppend; } return $baseDirectory; }
/** * Test if the passed directory will be appended correctly. * * @return void */ public function testGetBaseDirectoryWithDirectoryToAppend() { // create a directory $aDirectory = ApplicationTest::BASE_DIRECTORY . DIRECTORY_SEPARATOR . ApplicationTest::NAME; // inject the base directory $this->assertEquals($aDirectory, $this->application->getBaseDirectory(DIRECTORY_SEPARATOR . ApplicationTest::NAME)); }