X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2Fsession%2FSessionBackendTest.php;h=8a0adbad76d89858914fa45e70af14ed302378d2;hb=3e7d3d998a2d25927f0deb061e0c9831926c2dcf;hp=a3d5de772c71e1bec4c259f4571ed3d95b05ec74;hpb=476a926d79225402de952ec6977d2260e356d2f8;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/includes/session/SessionBackendTest.php b/tests/phpunit/includes/session/SessionBackendTest.php index a3d5de772c..8a0adbad76 100644 --- a/tests/phpunit/includes/session/SessionBackendTest.php +++ b/tests/phpunit/includes/session/SessionBackendTest.php @@ -464,7 +464,7 @@ class SessionBackendTest extends MediaWikiTestCase { // Save happens when delay is consumed $this->onSessionMetadataCalled = false; $priv->metaDirty = true; - \ScopedCallback::consume( $delay ); + \Wikimedia\ScopedCallback::consume( $delay ); $this->assertTrue( $this->onSessionMetadataCalled ); // Test multiple delays @@ -475,11 +475,11 @@ class SessionBackendTest extends MediaWikiTestCase { $priv->metaDirty = true; $priv->autosave(); $this->assertFalse( $this->onSessionMetadataCalled ); - \ScopedCallback::consume( $delay3 ); + \Wikimedia\ScopedCallback::consume( $delay3 ); $this->assertFalse( $this->onSessionMetadataCalled ); - \ScopedCallback::consume( $delay1 ); + \Wikimedia\ScopedCallback::consume( $delay1 ); $this->assertFalse( $this->onSessionMetadataCalled ); - \ScopedCallback::consume( $delay2 ); + \Wikimedia\ScopedCallback::consume( $delay2 ); $this->assertTrue( $this->onSessionMetadataCalled ); } @@ -822,7 +822,7 @@ class SessionBackendTest extends MediaWikiTestCase { $rProp = new \ReflectionProperty( PHPSessionHandler::class, 'instance' ); $rProp->setAccessible( true ); $handler = \TestingAccessWrapper::newFromObject( $rProp->getValue() ); - $resetHandler = new \ScopedCallback( function () use ( $handler ) { + $resetHandler = new \Wikimedia\ScopedCallback( function () use ( $handler ) { session_write_close(); $handler->enable = false; } ); @@ -862,7 +862,7 @@ class SessionBackendTest extends MediaWikiTestCase { $rProp = new \ReflectionProperty( PHPSessionHandler::class, 'instance' ); $rProp->setAccessible( true ); $handler = \TestingAccessWrapper::newFromObject( $rProp->getValue() ); - $resetHandler = new \ScopedCallback( function () use ( $handler ) { + $resetHandler = new \Wikimedia\ScopedCallback( function () use ( $handler ) { session_write_close(); $handler->enable = false; } ); @@ -898,7 +898,7 @@ class SessionBackendTest extends MediaWikiTestCase { $rProp = new \ReflectionProperty( PHPSessionHandler::class, 'instance' ); $rProp->setAccessible( true ); $handler = \TestingAccessWrapper::newFromObject( $rProp->getValue() ); - $resetHandler = new \ScopedCallback( function () use ( $handler ) { + $resetHandler = new \Wikimedia\ScopedCallback( function () use ( $handler ) { session_write_close(); $handler->enable = false; } );