Pinq\Tests\Integration\ExpressionTrees\ExpressionEvaluationTest::testIssetWithFields PHP Method

testIssetWithFields() public method

public testIssetWithFields ( )
    public function testIssetWithFields()
    {
        $this->assertEvaluatesTo(function () {
            isset($GLOBALS['bddbbddb']->foo);
        }, false);
        $GLOBALS['bddbbddb'] = true;
        $this->assertEvaluatesTo(function () {
            isset($GLOBALS['bddbbddb']->foo);
        }, false);
        $GLOBALS['bddbbddb'] = (object) ['foo' => true];
        $this->assertEvaluatesTo(function () {
            isset($GLOBALS['bddbbddb']->foo);
        }, true);
    }