-3

When I run PHPUNIT in my terminal there is an error.

[1]devel@manjaro1|0|16:41:28|~ > cd Projects/forum

[2]devel@manjaro1|0|16:41:34|~/Projects/forum > phpunit PHP Fatal error: Uncaught PHPUnit_Framework_Exception: Neither ".php" nor ".php" could be opened. in /opt/lampp/lib/php/PHPUnit/Util/Skeleton/Test.php:100
Stack trace:
#0 /opt/lampp/lib/php/PHPUnit/TextUI/Command.php(152): PHPUnit_Util_Skeleton_Test->__construct('', '')
#1 /opt/lampp/lib/php/PHPUnit/TextUI/Command.php(126): PHPUnit_TextUI_Command->run(Array, true)
#2 /opt/lampp/bin/phpunit(46): PHPUnit_TextUI_Command::main()
#3 {main}
thrown in /opt/lampp/lib/php/PHPUnit/Util/Skeleton/Test.php on line 100

Fatal error: Uncaught PHPUnit_Framework_Exception: Neither ".php" nor ".php" could be opened. in /opt/lampp/lib/php/PHPUnit/Util/Skeleton/Test.php:100
Stack trace:
#0 /opt/lampp/lib/php/PHPUnit/TextUI/Command.php(152): PHPUnit_Util_Skeleton_Test->__construct('', '')
#1 /opt/lampp/lib/php/PHPUnit/TextUI/Command.php(126): PHPUnit_TextUI_Command->run(Array, true)
#2 /opt/lampp/bin/phpunit(46): PHPUnit_TextUI_Command::main()
#3 {main}
thrown in /opt/lampp/lib/php/PHPUnit/Util/Skeleton/Test.php on line 100

3

1 Answer 1

1

You have to specify your .php file that you want to test.

Like this line if you want to use phpUnit on your file Myclass.php :

.....> phpunit MyClass.php
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.