In a Drupal 8 testclass I am trying to install the bootstrap theme (v 8.x-3.1). It is saved in the /theme directory. No problem when using the UI. Unfortunately I get an error in the test when I try to install it with this code:

 * Anytest
 * @group proreos
 * @runTestsInSeparateProcesses
 * @preserveGlobalState disabled
class CalculatorControllerTest extends BrowserTestBase {

  public function setUp() {

The test exits with the following error:

PHPunit Test failed to complete; Error: PHPUnit 4.8.27 by Sebastian
Bergmann and contributors.
There was 1 error:

Drupal\Core\Config\Schema\SchemaIncompleteException: Schema errors for
bootstrap.settings with the following errors: bootstrap.settings:schemas
missing schema


Any advice on this? Anyone tried to install bootstrap in an PHPUnit test sucessfully?


  • I think I just ran into something similar last week. drupal.stackexchange.com/questions/226501/…
    – Kevin
    Feb 2, 2017 at 19:07
  • Hm, I read the patch, thanks. But there is already a /themes/bootstrap/config/schema/bootstrap.schema.yml file in the bootstrap distro. So that's not the problem here. Feb 2, 2017 at 19:17
  • The file exists, but it's basically empty and doesn't define anything: cgit.drupalcode.org/bootstrap/tree/config/schema/…. schemas is not defined nor is anything else. You could disable schema validation, check the parent, but you should at least report this as a bug
    – Berdir
    Feb 2, 2017 at 20:09
  • bootstrap.schema.yml looks like bartik.schema.yml, it just doesn't declare any DB stuff because there's nothing to declare. I don't think it's a bootstrap bug. Do you know how to disable schema validation in PHPUnit tests? Feb 3, 2017 at 8:08

1 Answer 1


Thanks to Berdir for the hint. The solution is to disable the schema validation here. It's done with this code in my testclass:

protected function getConfigSchemaExclusions() {
  return array_merge(parent::getConfigSchemaExclusions(), ['bootstrap.settings']);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.