File tree Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ namespace phpmock \mockery ;
4
+
5
+ /**
6
+ * Tests process isolation.
7
+ *
8
+ * @author Markus Malkusch <[email protected] >
9
+ * @link bitcoin:1335STSwu9hST4vcMRppEPgENMHD2r1REK Donations
10
+ * @license http://www.wtfpl.net/txt/copying/ WTFPL
11
+ */
12
+ class ProcessIsolationTest extends \PHPUnit_Framework_TestCase
13
+ {
14
+
15
+ public static function setUpBeforeClass ()
16
+ {
17
+ // e.g. the autoloader of nikic/php-parser does that.
18
+ ini_set ('unserialize_callback_func ' , 'spl_autoload_call ' );
19
+ }
20
+
21
+ protected function tearDown ()
22
+ {
23
+ parent ::tearDown ();
24
+
25
+ \Mockery::close ();
26
+ }
27
+
28
+ /**
29
+ * Tests deserialization.
30
+ *
31
+ * @test
32
+ * @runInSeparateProcess
33
+ */
34
+ public function testDeserializationInNewProcess ()
35
+ {
36
+ PHPMockery::mock (__NAMESPACE__ , "time " )->andReturn (123 );
37
+ $ this ->assertEquals (123 , time ());
38
+ }
39
+ }
You can’t perform that action at this time.
0 commit comments