Pinq\Tests\Integration\ExpressionTrees\MagicConstantInterpreterTest::testClass PHP Method

testClass() public method

public testClass ( )
    public function testClass()
    {
        $this->assertRecompilesCorrectly([$this, 'classMagicConstant']);
        $this->assertRecompilesCorrectly(function () {
            return [__CLASS__, __CLASS__];
        });
        //Apparently when a closure is defined (only) in a trait, __CLASS__ returns the scoped class
        $closure = $this->classMagicConstantInClosure();
        $this->assertRecompilesCorrectly($closure);
        $closure = \Closure::bind($closure, new \stdClass());
        $this->assertRecompilesCorrectly($closure);
        $closure = \Closure::bind($closure, null, 'stdClass');
        $this->assertRecompilesCorrectly($closure);
    }