CacheTool\CodeTest::testNotice PHP Method

testNotice() public method

public testNotice ( )
    public function testNotice()
    {
        error_reporting(E_ALL);
        $result = $this->getCodeResult('strlen($foo); return true;');
        $this->assertTrue($result['result']);
        $this->assertCount(1, $result['errors']);
        $this->assertSame(E_NOTICE, $result['errors'][0]['no']);
        $this->assertSame("Undefined variable: foo", $result['errors'][0]['str']);
    }