Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems with tests that uses "require" #9

Open
royopa opened this issue Nov 13, 2017 · 0 comments
Open

Problems with tests that uses "require" #9

royopa opened this issue Nov 13, 2017 · 0 comments

Comments

@royopa
Copy link
Contributor

royopa commented Nov 13, 2017

We have a lot of problems with tests that uses require or include, because in PHPT the tests are running in another folder (PHP_HEAD for example).

---- EXPECTED OUTPUT
string(11) "Hello world"
---- ACTUAL OUTPUT
Warning: include(php_cli_server.inc): failed to open stream: No such file or directory in /usr/src/phpt/php_cli_server_001.php on line 2

Warning: include(): Failed opening 'php_cli_server.inc' for inclusion (include_path='.:/usr/local/lib/php') in /usr/src/phpt/php_cli_server_001.php on line 2

Fatal error: Uncaught Error: Call to undefined function php_cli_server_start() in /usr/src/phpt/php_cli_server_001.php:3
Stack trace:
#0 {main}
thrown in /usr/src/phpt/php_cli_server_001.php on line 3
---- FAILED

Maybe would be a good idea if phptt would run the test in the original folder where the phpt file is located to avoid this error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant