Pinq\Tests\Integration\Expressions\ExpressionOperatorTest::testCasts PHP Метод

testCasts() публичный Метод

public testCasts ( )
    public function testCasts()
    {
        $this->assertSame([], Cast::doCast(Cast::ARRAY_CAST, new \stdClass()));
        $this->assertSame(false, Cast::doCast(Cast::BOOLEAN, '0'));
        $this->assertSame(0.1, Cast::doCast(Cast::DOUBLE, '0.1'));
        $this->assertSame(-1, Cast::doCast(Cast::INTEGER, '-1'));
        $this->assertEquals(new \stdClass(), Cast::doCast(Cast::OBJECT, []));
        $this->assertSame('2.3', Cast::doCast(Cast::STRING, 2.3));
    }