Skip to content

Instantly share code, notes, and snippets.

@andrewhl
Created February 23, 2014 23:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andrewhl/9178764 to your computer and use it in GitHub Desktop.
Save andrewhl/9178764 to your computer and use it in GitHub Desktop.
Cannot get PHPUnit xml file to detect tests with bin/phpunit command
{
"require": {
"phpspec/phpspec": "2.0.*@dev",
"phpunit/phpunit": "3.7.31",
"behat/behat": "2.4.*@stable",
"behat/mink": "1.5.0",
"behat/mink-extension": "*",
"behat/mink-goutte-driver": "*",
"behat/mink-selenium-driver": "*",
"behat/mink-selenium2-driver": "*",
"raveren/kint": "dev-1.0.0-wip",
"chriskite/phactory": "v0.4.3"
},
"require-dev": {
"phpspec/phpspec": "2.0.*@dev"
},
"minimum-stability": "dev",
"config": {
"bin-dir": "bin/"
},
"autoload": {
"psr-0": {
"": "src"
},
"classmap": ["lib/"],
"files": ["includes/credentials.php"]
}
}
$ bin/phpunit
PHPUnit 3.7.31 by Sebastian Bergmann.
Configuration read from /Path/To/Project/phpunit.xml
Time: 24 ms, Memory: 1.75Mb
No tests executed!
# located in tests/FooTest.php
<?php
class FooTest extends PHPUnit_Framework_TestCase
{
public function it_should_work()
{
$foo = true;
$this->assertTrue($foo);
}
}
<phpunit boostrap="vendor/autoload.php"
colors="true"
convertErrorsToException="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
syntaxCheck="false">
<testsuites>
<testsuite name="Tests">
<directory suffix="Test.php">
tests
</directory>
</testsuite>
</testsuites>
</phpunit>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment