Phalcon\Test\Unit\Db\Adapter\Pdo\MysqlTest::testEscapeIdentifier PHP Method

testEscapeIdentifier() public method

Tests Mysql::escapeIdentifier
Since: 2016-11-19
Author: Sid Roberts ([email protected])
    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`"]]]);
    }