dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Pass context to ChangeTags::tagDescription"
[lhc/web/wiklou.git]
/
tests
/
phpunit
/
includes
/
session
/
PHPSessionHandlerTest.php
diff --git
a/tests/phpunit/includes/session/PHPSessionHandlerTest.php
b/tests/phpunit/includes/session/PHPSessionHandlerTest.php
index
ce0f1b0
..
34e5e44
100644
(file)
--- a/
tests/phpunit/includes/session/PHPSessionHandlerTest.php
+++ b/
tests/phpunit/includes/session/PHPSessionHandlerTest.php
@@
-21,7
+21,7
@@
class PHPSessionHandlerTest extends MediaWikiTestCase {
}
return false;
} );
}
return false;
} );
- $reset[] = new \ScopedCallback( 'restore_error_handler' );
+ $reset[] = new \
Wikimedia\
ScopedCallback( 'restore_error_handler' );
$rProp = new \ReflectionProperty( PHPSessionHandler::class, 'instance' );
$rProp->setAccessible( true );
$rProp = new \ReflectionProperty( PHPSessionHandler::class, 'instance' );
$rProp->setAccessible( true );
@@
-30,7
+30,7
@@
class PHPSessionHandlerTest extends MediaWikiTestCase {
$oldManager = $old->manager;
$oldStore = $old->store;
$oldLogger = $old->logger;
$oldManager = $old->manager;
$oldStore = $old->store;
$oldLogger = $old->logger;
- $reset[] = new \ScopedCallback(
+ $reset[] = new \
Wikimedia\
ScopedCallback(
[ PHPSessionHandler::class, 'install' ],
[ $oldManager, $oldStore, $oldLogger ]
);
[ PHPSessionHandler::class, 'install' ],
[ $oldManager, $oldStore, $oldLogger ]
);
@@
-49,7
+49,7
@@
class PHPSessionHandlerTest extends MediaWikiTestCase {
$rProp = new \ReflectionProperty( PHPSessionHandler::class, 'instance' );
$rProp->setAccessible( true );
$rProp = new \ReflectionProperty( PHPSessionHandler::class, 'instance' );
$rProp->setAccessible( true );
- $reset = new \ScopedCallback( [ $rProp, 'setValue' ], [ $rProp->getValue() ] );
+ $reset = new \
Wikimedia\
ScopedCallback( [ $rProp, 'setValue' ], [ $rProp->getValue() ] );
$rProp->setValue( $handler );
$handler->setEnableFlags( 'enable' );
$rProp->setValue( $handler );
$handler->setEnableFlags( 'enable' );
@@
-123,7
+123,7
@@
class PHPSessionHandlerTest extends MediaWikiTestCase {
] );
PHPSessionHandler::install( $manager );
$wrap = \TestingAccessWrapper::newFromObject( $rProp->getValue() );
] );
PHPSessionHandler::install( $manager );
$wrap = \TestingAccessWrapper::newFromObject( $rProp->getValue() );
- $reset[] = new \ScopedCallback(
+ $reset[] = new \
Wikimedia\
ScopedCallback(
[ $wrap, 'setEnableFlags' ],
[ $wrap->enable ? $wrap->warn ? 'warn' : 'enable' : 'disable' ]
);
[ $wrap, 'setEnableFlags' ],
[ $wrap->enable ? $wrap->warn ? 'warn' : 'enable' : 'disable' ]
);
@@
-173,14
+173,6
@@
class PHPSessionHandlerTest extends MediaWikiTestCase {
$this->assertSame( $expect, $_SESSION );
}
$this->assertSame( $expect, $_SESSION );
}
- // Test expiry
- session_write_close();
- ini_set( 'session.gc_divisor', 1 );
- ini_set( 'session.gc_probability', 1 );
- sleep( 3 );
- session_start();
- $this->assertSame( [], $_SESSION );
-
// Re-fill the session, then test that session_destroy() works.
$_SESSION['AuthenticationSessionTest'] = $rand;
session_write_close();
// Re-fill the session, then test that session_destroy() works.
$_SESSION['AuthenticationSessionTest'] = $rand;
session_write_close();
@@
-334,7
+326,7
@@
class PHPSessionHandlerTest extends MediaWikiTestCase {
\TestingAccessWrapper::newFromObject( $handler )->setEnableFlags( 'disable' );
$oldValue = $rProp->getValue();
$rProp->setValue( $handler );
\TestingAccessWrapper::newFromObject( $handler )->setEnableFlags( 'disable' );
$oldValue = $rProp->getValue();
$rProp->setValue( $handler );
- $reset = new \ScopedCallback( [ $rProp, 'setValue' ], [ $oldValue ] );
+ $reset = new \
Wikimedia\
ScopedCallback( [ $rProp, 'setValue' ], [ $oldValue ] );
call_user_func_array( [ $handler, $method ], $args );
}
call_user_func_array( [ $handler, $method ], $args );
}