I have written an abstract test case class that is to be extended by concrete test case classes.
It extends from the PHPUnit_TestCase.
Is th
Just add the skip on the setUp():
protected function setUp()
{
$this->markTestIncomplete();
}
If it is named FooTest
rename it to FooTestCase
.
Assuming you want to exclude the file name TestCase.php
.
As in my case I use this class as an abstract to all my test classes which itself extends PHPUnit_Framework_TestCase
.
Solution: add this to your phpunit.xml
<testsuites>
<testsuite name="BLABLA">
<directory suffix=".php">./tests</directory>
<exclude>./tests/TestCase.php</exclude>
</testsuite>
</testsuites>
My TestCase.php
example:
<?php
namespace Foo\Bar\Tests;
use Mockery as M;
use PHPUnit_Framework_TestCase as PHPUnit;
/**
* Class TestCase is the Parent test class that every test class must extend from.
*/
class TestCase extends PHPUnit
{
public function __construct()
{
parent::__construct();
}
//...