I am new to phpunit and kind of stuck in testing a database function with dbunit and getting the following error.
Fatal error: Cannot call constructor in C:\xampp\htdocs\testcases\PHPUnit\Extens ions\Database\Constraint\DataSetIsEqual.php on line 41
My test function is as follows.
public function testNewAccountCreation()
{
$bank_account = new BankAccount('12345678912345678', $this->pdo);
$bank_account->addAccount();
$expected = $this->createMySQLXMLDataSet(dirname(__FILE__).'/_files/bank-account-after-new-account.xml');
$actual = new PHPUnit_Extensions_Database_DataSet_QueryDataSet($this->getConnection());
$actual->addTable('bank_account');
$this->assertDataSetsEqual($expected, $actual);
}
I think the error is on calling assertDataSetsEqual function. Can any body please help me out with this problem on how to solve this error.
Thanks, Furqan Ahmed.