I want to run a AllModelTest with phpunit command.
But when I try to run, there is nothing to test as a result.
Of course, there are many test codes.
$vendors/bin/phpunit --configuration app/Test/phpunit.xml
PHPUnit 3.7.38 by Sebastian Bergmann.
Configuration read from /Develop/web/app/Test/phpunit.xml
Time: 30 ms, Memory: 3.75Mb
No tests executed!
Also when I use a "Console/cake" command, it looks fine.
$ app/Console/cake test app AllModel --stderr
Welcome to CakePHP v2.5.8 Console
---------------------------------------------------------------
App : app
Path: /Develop/web/app/
---------------------------------------------------------------
CakePHP Test Shell
---------------------------------------------------------------
PHPUnit 3.7.38 by Sebastian Bergmann.
...
/app/Test/Case/Model/JanTest.php
I wrote the phpunit.xml like this.
<?xml version="1.0" encoding="utf-8" ?>
<phpunit bootstrap="phpunit-bootstrap.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
stopOnFailure="false">
<testsuites>
<testsuite name="Project Test Suite">
<directory suffix="Test.php">Test/Case/</directory>
</testsuite>
</testsuites>
</phpunit>
And the phpunit-bootstrap.php is like this.
<?php
$file = __DIR__.'/../../vendors/autoload.php';
if (!file_exists($file)) {
throw new RuntimeException('Install dependencies to run test suite.');
}
$autoload = require_once $file;
And the target test file "AllModelTest.php" is like this.
<?php
class AllModelTest extends CakeTestSuite {
public static function suite() {
$suite = new CakeTestSuite('All model tests');
$suite->addTestDirectory(TESTS . 'Case/Model');
return $suite;
}
}
What should I do to run the test from phpunit command ?
Thanks!