ApiMainTest: Fix typo
authorBrad Jorsch <bjorsch@wikimedia.org>
Thu, 12 Apr 2018 17:00:35 +0000 (13:00 -0400)
committerBrad Jorsch <bjorsch@wikimedia.org>
Thu, 12 Apr 2018 17:00:35 +0000 (13:00 -0400)
The mock wants to mock getRawIP, not getIP.

Change-Id: Id7febba6ba6a6762ebdd273fc882330c65882cd6

tests/phpunit/includes/api/ApiMainTest.php

index 8ffe4fc..d17334b 100644 (file)
@@ -46,7 +46,7 @@ class ApiMainTest extends ApiTestCase {
         */
        private function getNonInternalApiMain( array $requestData, array $headers = [] ) {
                $req = $this->getMockBuilder( WebRequest::class )
-                       ->setMethods( [ 'response', 'getIP' ] )
+                       ->setMethods( [ 'response', 'getRawIP' ] )
                        ->getMock();
                $response = new FauxResponse();
                $req->method( 'response' )->willReturn( $response );