Файловый менеджер - Редактировать - /var/www/html/mediawiki-1.43.1/tests/phpunit/tests/MediaWikiIntegrationTestCaseNoDbTest.php
Ðазад
<?php use MediaWiki\MediaWikiServices; /** * Verify that the database is unavailable in integration tests which didn't * indicate otherwise. * @see MediaWikiIntegrationTestCase::needsDB() * @coversNothing */ class MediaWikiIntegrationTestCaseNoDbTest extends MediaWikiIntegrationTestCase { public function testDBLoadBalancerFactory() { $this->expectException( RuntimeException::class ); $this->expectExceptionMessage( 'Database backend disabled' ); MediaWikiServices::getInstance()->getConnectionProvider()->getReplicaDatabase(); } public function testDBLoadBalancer() { $this->expectException( RuntimeException::class ); $this->expectExceptionMessage( 'Database backend disabled' ); MediaWikiServices::getInstance()->getDBLoadBalancer()->getConnection( DB_REPLICA ); } public function testServiceContainer() { $this->expectException( RuntimeException::class ); $this->expectExceptionMessage( 'Database backend disabled' ); $this->getServiceContainer()->getDBLoadBalancer()->getConnection( DB_REPLICA ); } public function testGetDb() { $this->expectException( LogicException::class ); $this->getDb(); } public function testDbProp() { $this->assertNull( $this->db ); } public function testAllowedMethods() { $lbFactory = MediaWikiServices::getInstance()->getDBLoadBalancerFactory(); $lbFactory->getMainLB(); $lbFactory->getLocalDomainID(); MediaWikiServices::getInstance()->getDBLoadBalancer()->getLocalDomainID(); $this->getServiceContainer()->getReadOnlyMode()->isReadOnly(); $this->addToAssertionCount( 1 ); } }
| ver. 1.1 | |
.
| PHP 8.4.18 | Ð“ÐµÐ½ÐµÑ€Ð°Ñ†Ð¸Ñ Ñтраницы: 0 |
proxy
|
phpinfo
|
ÐаÑтройка