예제 #1
0
 /**
  * @param Adapter $adapter
  * @dataProvider adapterProvider
  */
 public function testQuoteIdentifier(Adapter $adapter)
 {
     $this->assertEquals('`table`', $adapter->quoteIdentifier('table'));
     $this->assertEquals('```table```', $adapter->quoteIdentifier('`table`'));
     $this->assertEquals('`database`.`table`', $adapter->quoteIdentifier('database.table'));
     $this->assertEquals('```database```.```table```', $adapter->quoteIdentifier('`database`.`table`'));
 }
예제 #2
0
 /**
  * @param Adapter $adapter
  * @dataProvider adapterProvider
  */
 public function testInvalidResultMode(Adapter $adapter)
 {
     $this->setExpectedException(Exception\InvalidArgumentException::class);
     $select = new SelectQuery('SELECT * FROM fixture1 ORDER BY id ASC LIMIT 1');
     $result = $adapter->query($select);
     $result->setResultMode(1488);
 }