getBaseDirectory() public method

Returns the absolute path to the servers document root directory
public getBaseDirectory ( string $directoryToAppend = null ) : string
$directoryToAppend string The directory to append to the base directory
return string The base directory with appended dir if given
示例#1
0
 /**
  * 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));
 }