PHPUnit CompositeDataSet

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
rameses
Forum Newbie
Posts: 1
Joined: Thu Aug 06, 2009 10:59 pm

PHPUnit CompositeDataSet

Post by rameses »

Hi,

I've been trying to find an example of how to load multiple datasets in PHPUnit (DBUnit port). There doesn't seem to be any documentation - I believe this functionality was introduced in PHPUnit 3.3. Anyway, I've looked through the code, and I've found out:

- FlatXMLDataSet implements IDataSet (through inheritance from AbstractDataSet).

So I created an array of FlatXMLDataSet objects and passed it into the constructor for CompositeDataSet. I get the following error:

Argument 1 passed to PHPUnit_Extensions_Database_AbstractTester::setDataSet() must implement interface PHPUnit_Extensions_Database_DataSet_IDataSet,...

Can someone please help me?

Thanks,
Post Reply