/** * Tests Mysql::escapeIdentifier * * @author Sid Roberts <*****@*****.**> * @since 2016-11-19 */ public function testEscapeIdentifier() { $this->specify('Identifiers are not properly escaped', function ($identifier, $expected) { $escapedIdentifier = $this->connection->escapeIdentifier($identifier); expect($escapedIdentifier)->equals($expected); }, ["examples" => [["identifier" => "robots", "expected" => "`robots`"], ["identifier" => ["schema", "robots"], "expected" => "`schema`.`robots`"], ["identifier" => "`robots`", "expected" => "```robots```"], ["identifier" => ["`schema`", "rob`ots"], "expected" => "```schema```.`rob``ots`"]]]); }