tiger-seo / PhpBuiltinServer

Codeception extension for starting and stopping php built-in server
38 stars 35 forks source link

Wrong documentRoot breaks silently #18

Closed schorsch3000 closed 8 years ago

schorsch3000 commented 9 years ago

The documentRoot from the Readme is _data so i assumed it points to $projectdir/tests/_data but infacts it points to $projectdir/_data.

in PhpBuiltinServer::getCommand()

realpath($this->config['documentRoot'])

is called, but the returnvalue is not checked. which in my case results in an empty-string.

the error-log describes this perfectly:

Directory  does not exist.

notice the two spaces between "Directory" and "does". since there is the directory-name.

I thinks the return value of realpath() should be checked and the startup should be prevented with a error-message since this helps setting up the project and you don't get false-negative test cases.

Greetings, Dirk

tiger-seo commented 9 years ago

Hi, Dirk

please check latest in master ;)

tiger-seo commented 8 years ago

fixed