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