Permalink
Browse files

PostgreSQL: Test execution of multiple COPY commands

  • Loading branch information...
1 parent 252c636 commit d1e86ec0ee072b00428849f368ef187c689cf7d7 @cbandy committed Aug 4, 2010
Showing with 10 additions and 0 deletions.
  1. +10 −0 tests/database/postgresql.php
@@ -100,6 +100,16 @@ public function test_execute_copy()
$this->assertNull($this->_db->execute_query('COPY '.$this->_table.' TO STDOUT'));
}
+ public function test_execute_multiple_copies()
+ {
+ $results = $this->_db->execute_multiple('COPY '.$this->_table.' TO STDOUT; COPY '.$this->_table.' TO STDOUT');
+
+ foreach ($results as $result)
+ {
+ $this->assertSame(0, $result);
+ }
+ }
+
public function test_execute_prepared_command()
{
$name = $this->_db->prepare(NULL, 'UPDATE '.$this->_table.' SET "value" = 20 WHERE "value" = 65');

0 comments on commit d1e86ec

Please sign in to comment.