From 3b82a453904034a8383ed4b2b17ccef45e0ad94c Mon Sep 17 00:00:00 2001 From: Marian Sollmann Date: Thu, 5 Jun 2014 11:32:46 +0200 Subject: [PATCH] add ip --- tests/helpers/CMTest/library/CMTest/TestCase.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/helpers/CMTest/library/CMTest/TestCase.php b/tests/helpers/CMTest/library/CMTest/TestCase.php index 26b818ae0..317c34995 100644 --- a/tests/helpers/CMTest/library/CMTest/TestCase.php +++ b/tests/helpers/CMTest/library/CMTest/TestCase.php @@ -161,19 +161,21 @@ public function getResponseForm($formClassName, $actionName, array $data, $compo /** * @param string $url * @param array $query - * @return CM_Request_Post + * @return CM_Request_Post|PHPUnit_Framework_MockObject_MockObject */ public function createRequest($url, array $query = null) { $url = (string) $url; - $request = $this->getMockBuilder('CM_Request_Post')->setConstructorArgs(array($url))->setMethods(array('getQuery'))->getMock(); + $ip = '16909060'; + $request = $this->getMockBuilder('CM_Request_Post')->setConstructorArgs(array($url))->setMethods(array('getQuery', 'getIp'))->getMock(); $request->expects($this->any())->method('getQuery')->will($this->returnValue($query)); + $request->expects($this->any())->method('getIp')->will($this->returnValue($ip)); return $request; } /** * @param CM_FormAction_Abstract $action * @param array|null $data - * @return CM_Request_Post + * @return CM_Request_Post|PHPUnit_Framework_MockObject_MockObject */ public function createRequestFormAction(CM_FormAction_Abstract $action, array $data = null) { $actionName = $action->getName();