sebastianbergmann / dbunit

DbUnit port for PHP/PHPUnit.
https://phpunit.de/
Other
225 stars 186 forks source link

TestCaseTrait is not found #211

Closed kschroeer closed 6 years ago

kschroeer commented 6 years ago

I have the following class declaration:

namespace MyAppTest\Integration\Rest;

use PHPUnit\DbUnit\TestCaseTrait; use Zend\Http\Header\ContentType; use Zend\Test\PHPUnit\Controller\AbstractHttpControllerTestCase;

abstract class AbstractResourceTestCase extends AbstractHttpControllerTestCase { use TestCaseTrait; ... }

Running phpunit ends up in the errorr that TestCaseTrait was not found. I installed dbunit via composer. As I saw, the TestCaseTrait has no namespace so PHPUnit\DbUnit is wrong?

sebastianbergmann commented 6 years ago

Which version of PHPUnit and DbUnit did you install?

kschroeer commented 6 years ago

Hi,

these are my versions:

phpunit => 5.7.27 dbunit => 2.0.3

and my testsuite should be executed on a machine with php 5.6.

sebastianbergmann commented 6 years ago

PHPUnit 5.7 is no longer supported. Please open a new ticket in case this still applies to a supported version of PHPUnit.