Pinq\Tests\Integration\Parsing\SimpleParserTest::testCastOperators PHP Метод

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

public testCastOperators ( )
    public function testCastOperators()
    {
        $this->assertCast(function () {
            (string) $i;
        }, O\Operators\Cast::STRING, 'i');
        $this->assertCast(function () {
            (int) $i;
        }, O\Operators\Cast::INTEGER, 'i');
        $this->assertCast(function () {
            (int) $i;
        }, O\Operators\Cast::INTEGER, 'i');
        $this->assertCast(function () {
            (double) $i;
        }, O\Operators\Cast::DOUBLE, 'i');
        $this->assertCast(function () {
            (double) $i;
        }, O\Operators\Cast::DOUBLE, 'i');
        $this->assertCast(function () {
            (object) $i;
        }, O\Operators\Cast::OBJECT, 'i');
        $this->assertCast(function () {
            (array) $i;
        }, O\Operators\Cast::ARRAY_CAST, 'i');
    }