lithium\tests\integration\data\source\database\adapter\PostgreSqlTest::testValueByIntrospect PHP Method

testValueByIntrospect() public method

    public function testValueByIntrospect()
    {
        $expected = "'string'";
        $result = $this->_db->value("string");
        $this->assertInternalType('string', $result);
        $this->assertEqual($expected, $result);
        $expected = "'''this string is escaped'''";
        $result = $this->_db->value("'this string is escaped'");
        $this->assertInternalType('string', $result);
        $this->assertEqual($expected, $result);
        $this->assertIdentical("'t'", $this->_db->value(true));
        $this->assertIdentical(1, $this->_db->value('1'));
        $this->assertIdentical(1.1, $this->_db->value('1.1'));
    }