/**
  * Test if rows can't be inserted escaped once batch is done.
  *
  * @expectedException \RuntimeException
  */
 public function testRowsCantBeInsertedEscapedOnceDone()
 {
     $batch_insert = $this->connection->batchInsert('writers', ['name', 'birthday'], 350);
     $batch_insert->insert('Leo Tolstoy', new DateTime('1828-09-09'));
     $batch_insert->insert('Alexander Pushkin', new DateTime('1799-06-06'));
     $this->assertEquals(0, $this->connection->executeFirstCell('SELECT COUNT(`id`) AS "row_count" FROM `writers`'));
     $batch_insert->done();
     $this->assertEquals(2, $this->connection->executeFirstCell('SELECT COUNT(`id`) AS "row_count" FROM `writers`'));
     $batch_insert->insertEscaped($this->connection->escapeValue('Fyodor Dostoyevsky'), $this->connection->escapeValue(new DateTime('1821-11-11')));
 }
 /**
  * @expectedException \InvalidArgumentException
  */
 public function testExceptionOnUsupportedObject()
 {
     $this->connection->escapeValue($this->link);
 }