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')); }
public function toString(\b2\Quote $quote) { return $quote->value($this->constant); }
public function toString(\b2\Quote $quote) { return $quote->values($this->literals); }
public function toString(\b2\Quote $quote) { return $quote->identifier($this->identifier); }