installSampleSchema example


  protected $connection;

  /** * {@inheritdoc} */
  protected function setUp(): void {
    parent::setUp();
    $this->connection = Database::getConnection();
    $this->installSampleSchema();
    $this->addSampleData();
  }

  /** * Sets up tables for NULL handling. */
  public function ensureSampleDataNull() {
    $this->connection->insert('test_null')
      ->fields(['name', 'age'])
      ->values([
        'name' => 'Kermit',
        
/** * {@inheritdoc} */
  protected static $modules = ['database_test'];

  /** * {@inheritdoc} */
  protected function setUp(): void {
    parent::setUp();

    $this->installSampleSchema();
    $this->addSampleData();
  }

}
Home | Imprint | This part of the site doesn't use cookies.