function DbtngExampleRepositoryTest::setUp
Same name in other branches
- 4.0.x modules/dbtng_example/tests/src/Kernel/DbtngExampleRepositoryTest.php \Drupal\Tests\dbtng_example\Kernel\DbtngExampleRepositoryTest::setUp()
Kernel tests do not invoke hook_schema() or hook_install(). Therefore we have to do it if our tests expect them to have been run.
Overrides KernelTestBase::setUp
File
-
modules/
dbtng_example/ tests/ src/ Kernel/ DbtngExampleRepositoryTest.php, line 37
Class
- DbtngExampleRepositoryTest
- Kernel testing of the DbtngExampleRepository service.
Namespace
Drupal\Tests\dbtng_example\KernelCode
protected function setUp() : void {
parent::setUp();
// Install the schema we defined in hook_schema().
$this->installSchema('dbtng_example', 'dbtng_example');
// Inovke hook_install().
$this->container
->get('module_handler')
->invoke('dbtng_example', 'install');
}