Florianschmidtwelzow has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/263351

Change subject: Follow up mediawiki/core change
......................................................................

Follow up mediawiki/core change

RequestContext::getRequest() doesn't rely on the global wgRequest anymore,
stubbing it, doesn't result in the expected behaviour. Instead of doing this,
stub the request value of RequestContext correctly.

Follow up: I6115ba44e474619d02d456a103758fe73ed298e0

Bug: T123202
Change-Id: Ic543d2229a38ec325b00d6b99f5eb314a5b22641
---
M tests/Adapter/GatewayAdapterTest.php
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface 
refs/changes/51/263351/1

diff --git a/tests/Adapter/GatewayAdapterTest.php 
b/tests/Adapter/GatewayAdapterTest.php
index d14412f..465e10a 100644
--- a/tests/Adapter/GatewayAdapterTest.php
+++ b/tests/Adapter/GatewayAdapterTest.php
@@ -158,7 +158,7 @@
                $init = $this->getDonorTestData();
                $init['payment_method'] = 'cc';
 
-               $this->setMwGlobals( 'wgRequest', new FauxRequest( $init, false 
) );
+               RequestContext::getMain()->setRequest( new Fauxrequest( $init, 
false ) );
 
                $gateway = new TestingGlobalCollectAdapter();
                $gateway->do_transaction( 'Donate' );
@@ -170,7 +170,7 @@
 
                $init['recurring'] = '1';
                RequestContext::resetMain();
-               $this->setMwGlobals( 'wgRequest', new FauxRequest( $init, false 
) );
+               RequestContext::getMain()->setRequest( new Fauxrequest( $init, 
false ) );
 
                $gateway = new TestingGlobalCollectAdapter();
                $gateway->do_transaction( 'Donate' );

-- 
To view, visit https://gerrit.wikimedia.org/r/263351
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic543d2229a38ec325b00d6b99f5eb314a5b22641
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: master
Gerrit-Owner: Florianschmidtwelzow <florian.schmidt.stargatewis...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to