Exemplo n.º 1
0
 /**
  * @covers Fobia\DataBase\Query\QueryReplace::getQuery
  * @todo   Implement testGetQuery().
  */
 public function testGetQuery()
 {
     $q = $this->db->createReplaceQuery();
     $str = "REPLACE INTO user ( Host, User, Password ) VALUES ( 'localhost', 'test', '' )";
     $q->insertInto('user')->set('Host', $this->db->quote('localhost'))->set('User', $this->db->quote('test'))->set('Password', $this->db->quote(''));
     $this->assertEquals($str, $q->getQuery());
 }
Exemplo n.º 2
0
 /**
  * @covers Fobia\DataBase\Handler\MySQL::createReplaceQuery
  * @todo   Implement testCreateReplaceQuery().
  */
 public function testCreateReplaceQuery()
 {
     $q = $this->db->createReplaceQuery();
     $this->assertInstanceOf('\\Fobia\\DataBase\\Query\\QueryReplace', $q);
 }