"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "tests/phpunit/includes/auth/LegacyHookPreAuthenticationProviderTest.php" between
mediawiki-1.31.1.tar.gz and mediawiki-1.32.0.tar.gz

About: MediaWiki is a wiki engine (the collaborative editing software that runs for e.g. Wikipedia, the free encyclopedia).

LegacyHookPreAuthenticationProviderTest.php  (mediawiki-1.31.1):LegacyHookPreAuthenticationProviderTest.php  (mediawiki-1.32.0)
skipping to change at line 47 skipping to change at line 47
* Sets a mock on a hook * Sets a mock on a hook
* @param string $hook * @param string $hook
* @param object $expect From $this->once(), $this->never(), etc. * @param object $expect From $this->once(), $this->never(), etc.
* @return object $mock->expects( $expect )->method( ... ). * @return object $mock->expects( $expect )->method( ... ).
*/ */
protected function hook( $hook, $expect ) { protected function hook( $hook, $expect ) {
$mock = $this->getMockBuilder( __CLASS__ )->setMethods( [ "on$hoo k" ] )->getMock(); $mock = $this->getMockBuilder( __CLASS__ )->setMethods( [ "on$hoo k" ] )->getMock();
$this->mergeMwGlobalArrayValue( 'wgHooks', [ $this->mergeMwGlobalArrayValue( 'wgHooks', [
$hook => [ $mock ], $hook => [ $mock ],
] ); ] );
$mockClass = get_class( $mock );
$this->hideDeprecated( "$hook hook (used in $mockClass::on$hook)"
);
return $mock->expects( $expect )->method( "on$hook" ); return $mock->expects( $expect )->method( "on$hook" );
} }
/** /**
* Unsets a hook * Unsets a hook
* @param string $hook * @param string $hook
*/ */
protected function unhook( $hook ) { protected function unhook( $hook ) {
$this->mergeMwGlobalArrayValue( 'wgHooks', [ $this->mergeMwGlobalArrayValue( 'wgHooks', [
$hook => [], $hook => [],
 End of changes. 1 change blocks. 
0 lines changed or deleted 3 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)