Permalink
Browse files

Fixing test for postgreSQL

  • Loading branch information...
1 parent a97d79f commit 2f23da57130c17d05b0265a822eb89eccad78737 @mnapoli committed Dec 14, 2012
Showing with 4 additions and 10 deletions.
  1. +4 −10 tests/Doctrine/Tests/DBAL/Functional/Ticket/DBAL371Test.php
@@ -24,24 +24,18 @@ protected function setUp()
$this->_conn->getSchemaManager()->createTable($table);
}
- /**
- * @expectedException \Doctrine\DBAL\Driver\DriverException
- */
- public function testException()
- {
- $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->execute();
+ $exception = false;
try {
$stmt->execute();
} catch(DBALException $e) {
+ $exception = true;
+ $this->assertInstanceOf('Doctrine\DBAL\Driver\DriverException', $e);
$this->assertGreaterThan(0, $e->getCode());
}
+ $this->assertTrue($exception);
}
}

0 comments on commit 2f23da5

Please sign in to comment.