public function MongoDbTestBase::setUp in MongoDB 8.2
Overrides KernelTestBase::setUp
3 calls to MongoDbTestBase::setUp()
- DatabaseFactoryTest::setUp in modules/
mongodb/ tests/ src/ Kernel/ DatabaseFactoryTest.php - KeyValueTestBase::setUp in modules/
mongodb_storage/ tests/ src/ Kernel/ KeyValueTestBase.php - LoggerTest::setUp in modules/
mongodb_watchdog/ tests/ src/ Kernel/ LoggerTest.php
3 methods override MongoDbTestBase::setUp()
- DatabaseFactoryTest::setUp in modules/
mongodb/ tests/ src/ Kernel/ DatabaseFactoryTest.php - KeyValueTestBase::setUp in modules/
mongodb_storage/ tests/ src/ Kernel/ KeyValueTestBase.php - LoggerTest::setUp in modules/
mongodb_watchdog/ tests/ src/ Kernel/ LoggerTest.php
File
- modules/
mongodb/ tests/ src/ Kernel/ MongoDbTestBase.php, line 108
Class
- MongoDbTestBase
- Class MongoDbTestBase provides basic setUp()/tearDown() for MongoDB.
Namespace
Drupal\Tests\mongodb\KernelCode
public function setUp() : void {
parent::setUp();
// $_ENV if it comes from phpunit.xml <env>
// $_SERVER if it comes from the phpunit command line environment.
$this->uri = $_ENV['MONGODB_URI'] ?? $_SERVER['MONGODB_URI'] ?? static::DEFAULT_URI;
$this->settings = new Settings([
MongoDb::MODULE => $this
->getSettingsArray(),
]);
}