I'm trying to execute some databasetests with php unit but I keep getting the following errors:
My composer.json look like this:
{
"require": {
"phpunit/phpunit": "4.8",
"phpunit/dbunit": "^2.0"
}
This is the page I'm trying to perform the test on:
<?php
require_once 'autoload.php';
class testDatabase extends \PHPUnit_Extensions_Database_TestCase {
public function getConnection() {
$db = new PDO(
"mysql:host=localhost;dbname=mrf",
"", "");
return $this->createDefaultDBConnection($db, "bulletproof");
}
}
?>
I use the sql autoloader to load the main php classes and that looks like the following:
<?php
spl_autoload_register(function($class) {
require_once '../classes/' . $class . '.php';
});
?>
In my opinion, the strange thing is that the regular phpunit tests do run, but the dbUnit test do not. I tried several upgrades of composer, phpUnit and dbUnit downloaded from packagist but without succes.
Would be great if you could help me out, Thanks in advance.