示例#1
0
 public function testGetData_serializesClosure()
 {
     $testClosure = function () {
         $this->fail('should never be executed');
     };
     $expectedData = (new Serializer())->serialize($testClosure);
     $command = new ClosureCommand();
     $command->setClosure($testClosure);
     $data = $command->getData();
     $this->assertEquals($expectedData, $data);
 }