From bf39e30f2fe99634db744297b95dfa254bb88535 Mon Sep 17 00:00:00 2001 From: sun Date: Fri, 25 Jul 2014 00:25:43 +0200 Subject: [PATCH] Added regression test for #1351. --- tests/Regression/GitHub/1351.phpt | 27 +++++++++++++++++++ .../Regression/GitHub/1351/Issue1351Test.php | 21 +++++++++++++++ tests/Regression/GitHub/1351/UserData.php | 4 +++ 3 files changed, 52 insertions(+) create mode 100644 tests/Regression/GitHub/1351.phpt create mode 100644 tests/Regression/GitHub/1351/Issue1351Test.php create mode 100644 tests/Regression/GitHub/1351/UserData.php diff --git a/tests/Regression/GitHub/1351.phpt b/tests/Regression/GitHub/1351.phpt new file mode 100644 index 00000000000..deae0c7b6a9 --- /dev/null +++ b/tests/Regression/GitHub/1351.phpt @@ -0,0 +1,27 @@ +--TEST-- +GH-1351: Test result does not serialize test class in process isolation +--FILE-- + +--EXPECTF-- +PHPUnit %s by Sebastian Bergmann. + +F. + +Time: %s, Memory: %sMb + +There was 1 failure: + +1) Issue1351Test::testChildProcessDoesNotLeakPre +Expected failure. +%A +FAILURES! +Tests: 2, Assertions: 3, Failures: 1. \ No newline at end of file diff --git a/tests/Regression/GitHub/1351/Issue1351Test.php b/tests/Regression/GitHub/1351/Issue1351Test.php new file mode 100644 index 00000000000..480690422a5 --- /dev/null +++ b/tests/Regression/GitHub/1351/Issue1351Test.php @@ -0,0 +1,21 @@ +instance = new UserData(); + $this->assertFalse(TRUE, 'Expected failure.'); + } + + public function testChildProcessDoesNotLeakPost() + { + $this->assertNull($this->instance); + $this->assertFalse(class_exists('UserData', false), 'Class of child process does not exist.'); + } + +} diff --git a/tests/Regression/GitHub/1351/UserData.php b/tests/Regression/GitHub/1351/UserData.php new file mode 100644 index 00000000000..becc5219422 --- /dev/null +++ b/tests/Regression/GitHub/1351/UserData.php @@ -0,0 +1,4 @@ +