PHPUnit throws error on mountain lion -


i've followed instructions described here http://phpunit.de/getting-started.html

everything went fine when execute following command

phpunit --bootstrap src/autoload.php tests/moneytest 

it throws following error

phpunit 4.0.4 sebastian bergmann. php fatal error:  class 'sebastianbergmann\money\money' not found in /users/myname/sites/lab/unittesting/tests/moneytest.php on line 54 php stack trace: php   1. {main}() /usr/local/bin/phpunit:0 php   2. phpunit_textui_command::main() /usr/local/bin/phpunit:581 php   3. phpunit_textui_command->run() phar:///usr/local/bin/phpunit/phpunit/textui/command.php:132 php   4. phpunit_textui_testrunner->dorun() phar:///usr/local/bin/phpunit/phpunit/textui/command.php:179 php   5. phpunit_framework_testsuite->run() phar:///usr/local/bin/phpunit/phpunit/textui/testrunner.php:419 php   6. phpunit_framework_testcase->run() phar:///usr/local/bin/phpunit/phpunit/framework/testsuite.php:722 php   7. phpunit_framework_testresult->run() phar:///usr/local/bin/phpunit/phpunit/framework/testcase.php:764 php   8. phpunit_framework_testcase->runbare() phar:///usr/local/bin/phpunit/phpunit/framework/testresult.php:692 php   9. phpunit_framework_testcase->runtest() phar:///usr/local/bin/phpunit/phpunit/framework/testcase.php:824 php  10. reflectionmethod->invokeargs() phar:///usr/local/bin/phpunit/phpunit/framework/testcase.php:956 php  11. sebastianbergmann\money\moneytest->testexceptionisraisedforinvalidconstructorarguments() phar:///usr/local/bin/phpunit/phpunit/framework/testcase.php:956 

any idea might cause?

thanks

the following instructions worked me:

$ git clone https://github.com/sebastianbergmann/money

$ cd money

$ phpunit --bootstrap src/autoload.php tests/moneytest

phpunit 3.7.32 sebastian bergmann.  ......................  time: 882 ms, memory: 3.25mb  ok (22 tests, 41 assertions) 

be aware using 3.7.32 , using 4.0.4. if still not working bug.


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

android - Keyboard hides my half of edit-text and button below it even in scroll view -

css - Make div keyboard-scrollable in jQuery Mobile? -