public function testSecureClosureIntegrityFail() { $this->setExpectedException('Opis\\Closure\\SecurityException'); SecureClosure::setSecurityProvider(new DefaultSecurityProvider('secret')); $closure = function () { /*x*/ }; $value = serialize(new SecureClosure($closure)); $value = str_replace('/*x*/', '/*y*/', $value); $value = unserialize($value); }