= new PDO( $GLOBALS[‘DB_DSN'], $GLOBALS[‘DB_USER'], $GLOBALS[‘DB_PASSWD'] ); return $this->createDefaultDBConnection($pdo, $GLOBALS['DB_DBNAME']); } public function getDataSet() { return $this->createFlatXMLDataSet('player-seed.xml'); } } DB test S chem a? extract to abstract
1, $this->getConnection()->getRowCount('players') ); # add Player to the players db table $this->assertEquals( 2, $this->getConnection()->getRowCount('players') ); } } DB Assertions / RowCount
add Player to the players db table $queryTable = $this->getConnection()->createQueryTable( 'players', 'SELECT * FROM players' ); $expectedTable = $this ->createFlatXmlDataSet('expectedPlayer.xml') ->getTable('players'); $this->assertTablesEqual($expectedTable, $queryTable); } } DB Assertions / Table State