I would like to:
How can i do this? I tried to download the code here and including Autoload.php, but it still has some dependencies. Maybe it’s better for this than trying to associate it with my code ...?
Autoload.php
To include PHPUnit in the project source files, I suggest following the guide:
Using PHPUnit From a Git Checkout from the PHPUnit Contributung section.
Using PHPUnit From a Git Checkout
, , , , runner/wrapper script phpunit.
#!/bin/bash php -d include_path='.:../phpunit/:../dbunit/:../php-code-coverage/:../php-file-iterator/:../php-invoker/:../php-text-template/:../php-timer:../php-token-stream:../phpunit-mock-objects/:../phpunit-selenium/:../phpunit-story/:/usr/local/lib/php' ../phpunit/phpunit.php $*
, script, phpunit
require '/path/to/phpunit/PHPUnit/Autoload.php'; PHPUnit_TextUI_Command::main();
, phpunit.xml.dist cli script.
phpunit.xml.dist
git, . script :)
SO:
PHP - PHPUnit?
PHPUNIT
, , PHPUnit . PHP ( , ), . sibling APPLICATION_ROOT , "test", "lib" , PHPUnit, , , , . .
, , , , . , -, , PHP, Front Controller , , , . , , , ( .. ).
PHP - http://getComposer.org. PHPunit , http://packagist.org/packages/phpunit/phpunit
With the software installed, it will place the phpunit script command line in the local directory "bin /", so you can call it, although you most likely want to have a shell script that also sets the configuration the file will be used.
The usual setup is a subdirectory of tests / with a hierarchy of classes extending PHPunit that run the actual tests.