Ejemplo n.º 1
0
 public function testZendDbTableEqualsXmlDataSet()
 {
     $fooTable = $this->createFooTable();
     $fooTable->insert(array("id" => null, "foo" => "foo", "bar" => "bar", "baz" => "baz"));
     $fooTable->insert(array("id" => null, "foo" => "bar", "bar" => "bar", "baz" => "bar"));
     $fooTable->insert(array("id" => null, "foo" => "baz", "bar" => "baz", "baz" => "baz"));
     $dataSet = new DataSet\DbTableDataSet();
     $dataSet->addTable($fooTable);
     $xmlDataSet = new \PHPUnit_Extensions_Database_DataSet_FlatXmlDataSet(__DIR__ . "/_files/sqliteIntegrationFixture.xml");
     $this->assertTrue($xmlDataSet->assertEquals($dataSet));
 }
Ejemplo n.º 2
0
 public function testGetUnknownTableThrowsException()
 {
     $this->setExpectedException('InvalidArgumentException');
     $dataSet = new DataSet\DbTableDataSet();
     $dataSet->getTable('unknown');
 }
Ejemplo n.º 3
0
 public function testGetUnknownTableThrowsException()
 {
     $this->setExpectedException('\\Zend\\Test\\PHPUnit\\Db\\Exception\\InvalidArgumentException');
     $dataSet = new DataSet\DbTableDataSet();
     $dataSet->getTable('unknown');
 }