Episode #125 of the Stack Overflow podcast is here. We talk Tilde Club and mechanical keyboards. Listen now
2 removed "Drupal" and tags from the title
source | link

Drupal 8 test Test fails with custom configuration

After creating a custom configuration for my module "module_name.settings.yml" simpletest fails with this message "InvalidArgumentException: Invalid database prefix: in Drupal\Core\Test\TestDatabase->__construct() (line 81 of /path/to/installation/core/lib/Drupal/Core/Test/TestDatabase.php).". I

InvalidArgumentException: Invalid database prefix: in Drupal\Core\Test\TestDatabase->__construct() (line 81 of /path/to/installation/core/lib/Drupal/Core/Test/TestDatabase.php)

I reinstalled my module and everything works. I load the configurations configuration with the following code.

$config = \Drupal::config('module_name.settings');
$base = $config->get('module_name.variable');

But stillStill, I can't run my tests. If I remove the content from my configuration, tests run again. I'm using Drupal 8.3.4, Apache: 2.4.18, PHP: 7.0.8, and MariaDB: 10.1.25.

Drupal 8 test fails with custom configuration

After creating a custom configuration for my module "module_name.settings.yml" simpletest fails with this message "InvalidArgumentException: Invalid database prefix: in Drupal\Core\Test\TestDatabase->__construct() (line 81 of /path/to/installation/core/lib/Drupal/Core/Test/TestDatabase.php).". I reinstalled my module and everything works. I load the configurations

$config = \Drupal::config('module_name.settings');
$base = $config->get('module_name.variable');

But still I can't run my tests. If I remove the content from my configuration tests run again. I'm using Drupal 8.3.4, Apache: 2.4.18, PHP: 7.0.8, MariaDB: 10.1.25

Test fails with custom configuration

After creating a custom configuration for my module "module_name.settings.yml" simpletest fails with this message:

InvalidArgumentException: Invalid database prefix: in Drupal\Core\Test\TestDatabase->__construct() (line 81 of /path/to/installation/core/lib/Drupal/Core/Test/TestDatabase.php)

I reinstalled my module and everything works. I load the configuration with the following code.

$config = \Drupal::config('module_name.settings');
$base = $config->get('module_name.variable');

Still, I can't run my tests. If I remove the content from my configuration, tests run again. I'm using Drupal 8.3.4, Apache 2.4.18, PHP 7.0.8, and MariaDB 10.1.25.

1
source | link

Drupal 8 test fails with custom configuration

After creating a custom configuration for my module "module_name.settings.yml" simpletest fails with this message "InvalidArgumentException: Invalid database prefix: in Drupal\Core\Test\TestDatabase->__construct() (line 81 of /path/to/installation/core/lib/Drupal/Core/Test/TestDatabase.php).". I reinstalled my module and everything works. I load the configurations

$config = \Drupal::config('module_name.settings');
$base = $config->get('module_name.variable');

But still I can't run my tests. If I remove the content from my configuration tests run again. I'm using Drupal 8.3.4, Apache: 2.4.18, PHP: 7.0.8, MariaDB: 10.1.25