Ejemplo n.º 1
0
 public function testSimpleTesterSetupAndRowsetEquals()
 {
     $dataSet = new PHPUnit_Extensions_Database_DataSet_FlatXmlDataSet(dirname(__FILE__) . "/_files/sqliteIntegrationFixture.xml");
     $fooDataTable = $dataSet->getTable("foo");
     $tester = new Zend_Test_PHPUnit_Db_SimpleTester($this->getConnection());
     $tester->setUpDatabase($dataSet);
     $fooTable = $this->createFooTable();
     $rows = $fooTable->fetchAll();
     $this->assertEquals(3, count($rows));
     $rowsetTable = new Zend_Test_PHPUnit_Db_DataSet_DbRowset($rows);
     $rowsetTable->assertEquals($fooDataTable);
 }
 public function testRowsetGetSpecificRow()
 {
     $rowsetTable = new Zend_Test_PHPUnit_Db_DataSet_DbRowset($this->getRowSet(), "fooTable");
     $this->assertEquals(array("foo" => "baz"), $rowsetTable->getRow(1));
 }