I have a simple module written for Drupal 8. It contains a dummy test, that I use to understand the basics of the framework.
<?php
namespace Drupal\loremipsum\Tests;
use Drupal\simpletest\WebTestBase;
class LoremIpsumTests extends WebTestBase {
public static $modules = array('loremipsum');
private $user;
public function setUp() {
parent::setUp();
$this->user = $this->DrupalCreateUser(array(
'administer site configuration',
'generate lorem ipsum',
));
}
public function testDummy() {
// Login.
$this->drupalLogin($this->user);
$this->assertTrue(true,"True is true");
}
}
When running the tests through the admin GUI, the console spits out dozens of warnings that are not related at all to my module.
strpos() expects parameter 1 to be string, array given
strpos(Array, ':') (Line: 723)
Drupal\Core\Extension\ModuleHandler::parseDependency(Array) (Line: 228)
Drupal\Core\Extension\ModuleHandler->buildModuleDependencies(Array) (Line: 172)
Drupal\Core\Extension\ModuleExtensionList->doList() (Line: 274)
Drupal\Core\Extension\ExtensionList->getList() (Line: 1052)
system_rebuild_module_data() (Line: 1577)
install_profile_modules(Array) (Line: 638)
...
explode() expects parameter 2 to be string, array given
explode(':', Array) (Line: 724)
Drupal\Core\Extension\ModuleHandler::parseDependency(Array) (Line: 228)
Drupal\Core\Extension\ModuleHandler->buildModuleDependencies(Array) (Line: 172)
Drupal\Core\Extension\ModuleExtensionList->doList() (Line: 274)
Drupal\Core\Extension\ExtensionList->getList() (Line: 1052)
system_rebuild_module_data() (Line: 1577)
install_profile_modules(Array) (Line: 638)
...
I never use explode
nor strpos
anywhere in my module. When I test native modules from Drupal (like Logger for example) the warnings don't show up.
How can I trace where these error come from ? Is it possible it is from my YAML configurations ?
Aucun commentaire:
Enregistrer un commentaire