summaryrefslogtreecommitdiffstats
path: root/798.patch
diff options
context:
space:
mode:
Diffstat (limited to '798.patch')
-rw-r--r--798.patch96
1 files changed, 96 insertions, 0 deletions
diff --git a/798.patch b/798.patch
new file mode 100644
index 0000000..c394c24
--- /dev/null
+++ b/798.patch
@@ -0,0 +1,96 @@
+From ebcef93d662613c48eb8f9b53470992a66aaca9c Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Fri, 6 Oct 2017 14:51:05 +0200
+Subject: [PATCH 1/2] fix for 7.2
+
+---
+ tests/Mockery/DemeterChainTest.php | 2 +-
+ tests/Mockery/ExpectationTest.php | 6 +++---
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/tests/Mockery/DemeterChainTest.php b/tests/Mockery/DemeterChainTest.php
+index 9767f1ee..deed5eef 100644
+--- a/tests/Mockery/DemeterChainTest.php
++++ b/tests/Mockery/DemeterChainTest.php
+@@ -28,7 +28,7 @@ class DemeterChainTest extends MockeryTestCase
+
+ public function setUp()
+ {
+- $this->mock = $this->mock = Mockery::mock('object')->shouldIgnoreMissing();
++ $this->mock = $this->mock = Mockery::mock('stdClass')->shouldIgnoreMissing();
+ }
+
+ public function tearDown()
+diff --git a/tests/Mockery/ExpectationTest.php b/tests/Mockery/ExpectationTest.php
+index c3c31993..6d1ddf4d 100644
+--- a/tests/Mockery/ExpectationTest.php
++++ b/tests/Mockery/ExpectationTest.php
+@@ -1238,7 +1238,7 @@ public function testNumericConstraintThrowsExceptionWhenConstraintUnmatched()
+
+ public function testObjectConstraintMatchesArgument()
+ {
+- $this->mock->shouldReceive('foo')->with(Mockery::type('object'))->once();
++ $this->mock->shouldReceive('foo')->with(Mockery::type('stdClass'))->once();
+ $this->mock->foo(new stdClass);
+ $this->container->mockery_verify();
+ }
+@@ -1246,7 +1246,7 @@ public function testObjectConstraintMatchesArgument()
+ public function testObjectConstraintNonMatchingCase()
+ {
+ $this->mock->shouldReceive('foo')->times(3);
+- $this->mock->shouldReceive('foo')->with(1, Mockery::type('object`'))->never();
++ $this->mock->shouldReceive('foo')->with(1, Mockery::type('stdClass`'))->never();
+ $this->mock->foo();
+ $this->mock->foo(1);
+ $this->mock->foo(1, 2, 3);
+@@ -1258,7 +1258,7 @@ public function testObjectConstraintNonMatchingCase()
+ */
+ public function testObjectConstraintThrowsExceptionWhenConstraintUnmatched()
+ {
+- $this->mock->shouldReceive('foo')->with(Mockery::type('object'))->once();
++ $this->mock->shouldReceive('foo')->with(Mockery::type('stdClass'))->once();
+ $this->mock->foo('f');
+ $this->container->mockery_verify();
+ }
+
+From fe282c1ac52b127e4b8a66e9d46fb1edae1de8c7 Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Fri, 6 Oct 2017 15:03:10 +0200
+Subject: [PATCH 2/2] change mocked class to avoid Mockery/DateTimeZone.php not
+ found
+
+---
+ library/Mockery/Loader/EvalLoader.php | 1 -
+ tests/Mockery/NamedMockTest.php | 4 ++--
+ 2 files changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/library/Mockery/Loader/EvalLoader.php b/library/Mockery/Loader/EvalLoader.php
+index b9d172af..0fb62117 100644
+--- a/library/Mockery/Loader/EvalLoader.php
++++ b/library/Mockery/Loader/EvalLoader.php
+@@ -12,7 +12,6 @@ public function load(MockDefinition $definition)
+ if (class_exists($definition->getClassName(), false)) {
+ return;
+ }
+-
+ eval("?>" . $definition->getCode());
+ }
+ }
+diff --git a/tests/Mockery/NamedMockTest.php b/tests/Mockery/NamedMockTest.php
+index 28920072..28dd2fdd 100644
+--- a/tests/Mockery/NamedMockTest.php
++++ b/tests/Mockery/NamedMockTest.php
+@@ -33,11 +33,11 @@ public function itCreatesANamedMock()
+ /** @test */
+ public function itCreatesPassesFurtherArgumentsJustLikeMock()
+ {
+- $mock = Mockery::namedMock("Mockery\Dave456", "DateTime", array(
++ $mock = Mockery::namedMock("Mockery\Dave456", "DateTimeZone", array(
+ "getDave" => "dave"
+ ));
+
+- $this->assertInstanceOf("DateTime", $mock);
++ $this->assertInstanceOf("DateTimeZone", $mock);
+ $this->assertEquals("dave", $mock->getDave());
+ }
+