File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -155,7 +155,7 @@ public function testGetHostAndPort()
155155 $ host = 'localhost ' ;
156156 $ port = '123456 ' ;
157157
158- $ client = $ this ->createMock ('\Credis_Client ' );
158+ $ client = $ this ->createMockShim ('\Credis_Client ' );
159159 $ sentinel = new Credis_Sentinel ($ client );
160160
161161 $ client ->expects ($ this ->once ())->method ('getHost ' )->willReturn ($ host );
Original file line number Diff line number Diff line change @@ -151,10 +151,15 @@ public static function tearDownAfterClass()
151151 }
152152 }
153153
154+
155+ //
154156 /**
157+ * php 7.2 compat fix, as directly polyfilling for older PHPUnit causes a function signature compatibility issue
158+ * This is due to the defined return type
159+ *
155160 * Polyfill for older PHPUnit
156161 */
157- protected function createMock ($ originalClassName )
162+ protected function createMockShim ($ originalClassName )
158163 {
159164 if (method_exists ($ this , 'getMock ' )) {
160165 return $ this ->getMock ($ originalClassName );
@@ -165,6 +170,7 @@ protected function createMock($originalClassName)
165170
166171 /**
167172 * php 7.2 compat fix, as directly polyfilling for older PHPUnit causes a function signature compatibility issue
173+ * This is due to the defined return type
168174 */
169175 public function setExpectedExceptionShim ($ class , $ message = NULL , $ code = NULL )
170176 {
You can’t perform that action at this time.
0 commit comments