Permalink
Browse files

Fixing test for postgreSQL

  • Loading branch information...
1 parent 36ecd66 commit 6c54a8708b18543506d9ae939036b214ccdca71c @mnapoli committed Dec 14, 2012
Showing with 9 additions and 10 deletions.
  1. +9 −10 tests/Doctrine/Tests/DBAL/Functional/Ticket/DBAL371Test.php
@@ -14,30 +14,29 @@ protected function setUp()
{
parent::setUp();
- if ($this->_conn->getSchemaManager()->tablesExist('dbal371')) {
- $this->_conn->executeQuery('DELETE FROM dbal371');
- } else {
- $table = new \Doctrine\DBAL\Schema\Table('dbal371');
- $table->addColumn('id', 'integer');
- $table->setPrimaryKey(array('id'));
-
- $this->_conn->getSchemaManager()->createTable($table);
+ if ($this->_conn->getSchemaManager()->tablesExist('DBAL371')) {
+ $this->_conn->getSchemaManager()->dropTable('DBAL371');
}
+ $table = new \Doctrine\DBAL\Schema\Table('DBAL371');
+ $table->addColumn('id', 'integer');
+ $table->setPrimaryKey(array('id'));
+
+ $this->_conn->getSchemaManager()->createTable($table);
}
/**
* @expectedException \Doctrine\DBAL\Driver\DriverException
*/
public function testException()
{
- $stmt = $this->_conn->prepare('INSERT INTO dbal371 VALUES (1)');
+ $stmt = $this->_conn->prepare('INSERT INTO DBAL371 VALUES (1)');
$stmt->execute();
$stmt->execute();
}
public function testExceptionCode()
{
- $stmt = $this->_conn->prepare('INSERT INTO dbal371 VALUES (1)');
+ $stmt = $this->_conn->prepare('INSERT INTO DBAL371 VALUES (1)');
$this->_conn->beginTransaction();
$stmt->execute();
try {

0 comments on commit 6c54a87

Please sign in to comment.