php - How do I run directory-structured tests in phpunit? -
PHPUnit Docs says that I can move all my tests into a folder and
phpunit To execute all of these folders in the same folder:
But when I link my link to slim (https://github.com/codeguy/Slim) If you try on copy then it is not work! . I have installed PHPUnit through pears so I do not think anything is weird about it
Here's the output:
mark @ ubuntu: / project / submodules / Slim $ Phpunit Test PHP Fatal error: 'Exception' PHPUnit_Framework_Exception 'Message' neither can be opened "tests.php" nor "test.php". # 0 /usr/share/php/PHPUnit/TextUI/Command.php(157) ::; __ Construction ('test PHPUnit_Util_Skeleton_Test- & gt; /usr/share/php/PHPUnit/Util/Skeleton/Test.php:102' in stack trace ',' ') # 1 / usr / share / php / PHPUnit / TextUI / Command Php (129): PHPUnit_TextUI_Command-> Run (array, true) # 2 / usr / bin / PHPUnit (49): PHPUnit_TextUI_Command :: main () # 3 {main} throw at /usr/share/php/PHPUnit/Util/Skeleton/Test.php on line 102 Given Any ideas what I am doing wrong?
-EDIT -
I am using PHPUnit 3.5.15.
Directories code> slim and test here: sign @ Ubuntu: / project / subdomool / slim $ LS-L Total 20 -R-R-1 Mark Mark 4320 23 Aug 14: 41 README.markdown drwxr-xr-x 1 Marc Mark 408 24 Aug 02:39 SlimRR-R-1 Mark Mark 9 August 3 14:41 index.php-rw-r - r-- 1 Mark Mark 1398 Aug 23 14:41 logo.png drwxr-XR-x 1 Issue Mark 476 Aug 23 14:41 test mark @ ubuntu: / Project / submodules / slim $ ls -l test total 104 -rw-r -r-1 points digit 73 Aug 23 14:41 FU.D. -aks-XR-X 1 mark mark 204 August 23 14:41 Acteepi -R-R-R-1 Mark Mark 4398 August 23 14:41 log-Test. PHP-R-R-R-R-1 Issue Issue 5088 23 Aug 14:41 Logger Test. PHP-R-RR-R1 Mark Mark 734 Aug 23 14:41 RADE-RR-R1 Mark Mark 11115 23 Aug 14:41 Route Test .php-rw-rr-- 1 Mark Mark 10327 23 August 14:41 RoutortTest.php drwxr-xr-x1 Marc Mark 102 Aug 23 14:41 Session -RRR-R1 Mark Icon 47703 23 Aug 14:41 SlimTest.php-rw-r - r- - 1 digit mark 6447 23 Aug 14:41 ViewTest. Php drwxr-xr-x 1 marks mark 102 Aug 23 14:41 log drwxr-xr-x 1 mark mark 102 Aug 23 14:41 templates I have really cut slim and cloned it, some Not even fancy!
After
Generally you PHPUnit is the command inside the folder phpunit.xml and / or bootstrap.php . My guess is that they are located inside the test folder. ... / slim $ cd test ... / slim / test $ phpunit
Comments
Post a Comment