Файловый менеджер - Редактировать - /var/www/html/mediawiki-1.43.1/extensions/CookieWarning/tests/phpunit/includes/DecisionsTest.php
Ðазад
<?php namespace CookieWarning\Tests; use ConfigException; use CookieWarning\Decisions; use CookieWarning\GeoLocation; use HashBagOStuff; use MediaWikiIntegrationTestCase; use MWException; use RequestContext; use WANObjectCache; class DecisionsTest extends MediaWikiIntegrationTestCase { /** * @covers \CookieWarning\Decisions::shouldShowCookieWarning() * @throws ConfigException * @throws MWException */ public function testShouldNotCallGeoLocationMultiple() { $this->overrideConfigValues( [ 'CookieWarningEnabled' => true, 'CookieWarningGeoIPLookup' => 'php', 'CookieWarningForCountryCodes' => [ 'EU' => 'European Union' ], ] ); $geoLocation = $this->getMockBuilder( GeoLocation::class ) ->disableOriginalConstructor() ->getMock(); $geoLocation->method( 'locate' )->willReturn( 'EU' ); $geoLocation->expects( $this->once() )->method( 'locate' ); $cookieWarningDecisions = new Decisions( $this->getServiceContainer()->getService( 'CookieWarning.Config' ), $geoLocation, new WANObjectCache( [ 'cache' => new HashBagOStuff() ] ), $this->getServiceContainer()->getUserOptionsLookup() ); $cookieWarningDecisions->shouldShowCookieWarning( RequestContext::getMain() ); $cookieWarningDecisions->shouldShowCookieWarning( RequestContext::getMain() ); } }
| ver. 1.1 | |
.
| PHP 8.4.18 | Ð“ÐµÐ½ÐµÑ€Ð°Ñ†Ð¸Ñ Ñтраницы: 0 |
proxy
|
phpinfo
|
ÐаÑтройка