DefaultConfigTest::testDisallowsNonwhitelistedClass PHP Method

testDisallowsNonwhitelistedClass() public method

Test whether sandbox disallows non-whitelisted class
    public function testDisallowsNonwhitelistedClass()
    {
        $this->expectException('PHPSandbox\\Error');
        $this->sandbox->execute(function () {
            return \DateTime::createFromFormat('y', 'now');
        });
    }