Connect UnitTest to Project.



  • I'm studying the design pathters, reading about the patternum strategy - decided to build practice, downloading repositories. https://github.com/sebastianbergmann/state.git installed composer signed composer there require phpunit/php-token-stream, he loaded files on a vendor/phpunit
    Let's get to the patternum and the tests and they don't start--- written Fatal error: Class 'PHPUnit_Framework_TestCase' not found I found answers. https://stackoverflow.com/questions/6065730/why-fatal-error-class-phpunit-framework-testcase-not-found-in It didn't work.
    Can you tell me how you need to connect there to find her tests?
    Thank you.



  • You can't just run the test.

    1. You can create a file of phpunit.xml, point out the run tests + indicate bootstrap in the form of "vendor/autoload.php." https://phpunit.de/manual/current/en/appendixes.configuration.html
    2. Start phpunit by pointing him a bootstrap. phpunit --bootstrap src/autoload.php tests/MoneyTest♪ https://phpunit.de/getting-started.html

    Also, if you downloaded phpunit with composer'a, phpunit will lie in a vendor/bin.




Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2