Exemple #1
0
 public function testQuoteMysqli()
 {
     $mysqli = $this->getMockBuilder('mysqli')->setMethods(array('escape_string'))->getMock();
     $mysqli->expects($this->once())->method('escape_string')->with($this->equalTo('hello world'))->will($this->returnValue('{hello world}'));
     $quote = \b2\Quote::createFromMysqli($mysqli);
     $this->assertSame("'{hello world}'", $quote->value('hello world'));
     $this->assertSame('NULL', $quote->value(null));
     $this->assertSame('1', $quote->value(true));
     $this->assertSame('0', $quote->value(false));
     $this->assertSame('`hello`.`world`', $quote->identifier('hello.world'));
 }
Exemple #2
0
 public function toString(\b2\Quote $quote)
 {
     return $quote->value($this->constant);
 }
Exemple #3
0
 public function toString(\b2\Quote $quote)
 {
     return $quote->values($this->literals);
 }
Exemple #4
0
 public function toString(\b2\Quote $quote)
 {
     return $quote->identifier($this->identifier);
 }