Skip to content

Commit 7790bf3

Browse files
committed
test for passing a serialized MockDelegateFunction to a separate process
1 parent 9e9a8fc commit 7790bf3

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

tests/MockDelegateFunctionBuilderTest.php

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,4 +93,31 @@ public function provideTestBackupStaticAttributes()
9393
[]
9494
];
9595
}
96+
97+
/**
98+
* Tests deserialization.
99+
*
100+
* @test
101+
* @runInSeparateProcess
102+
* @dataProvider provideTestDeserializationInNewProcess
103+
*/
104+
public function testDeserializationInNewProcess($data)
105+
{
106+
unserialize($data);
107+
}
108+
109+
/**
110+
* Returns test cases for testDeserializationInNewProcess().
111+
*
112+
* @return array Test cases.
113+
*/
114+
public function provideTestDeserializationInNewProcess()
115+
{
116+
$builder = new MockDelegateFunctionBuilder();
117+
$builder->build("min");
118+
119+
return [
120+
[serialize($this->getMockForAbstractClass($builder->getFullyQualifiedClassName()))]
121+
];
122+
}
96123
}

0 commit comments

Comments
 (0)