Hello,
our tests started to fail after updating to 3.0.0-beta6 and I believe it is caused by changes in https://www.drupal.org/project/external_entities/issues/3056530 → .
We are importing external_entity config in our tests, which triggers route rebuilding. This then triggers the event which calls getAllRoutes(). In KernelTests, RouteProviderInterface is implemented by RouteProvider, which calls route rebuilding again. This triggers an exception, since route rebuilding is already in progress.
I created this test that passes in 3.0.0-beta5, but fails in 3.0.0-beta6.
<?php
declare(strict_types=1);
namespace Drupal\Tests\external_entities\Kernel;
use Drupal\Core\Entity\EntityTypeManagerInterface;
use Drupal\external_entities\Entity\ExternalEntityType;
use Drupal\KernelTests\KernelTestBase;
/**
* Test importing config from external_entities_drupalorg.
*
* @group ExternalEntities
*/
class DrupalOrgExternalEntityTest extends KernelTestBase {
/**
* {@inheritdoc}
*/
protected static $modules = [
'external_entities',
'external_entities_drupalorg',
];
/**
* {@inheritdoc}
*/
protected $strictConfigSchema = FALSE;
/**
* Test config import.
*/
public function testExternalEntityType(): void {
$this->installEntitySchema('external_entity_type');
$this->installConfig(['external_entities_drupalorg']);
$entityType = $this->container
->get(EntityTypeManagerInterface::class)
->getStorage('external_entity_type')
->load('drupalorg_jsonapi_module');
$this->assertInstanceOf(ExternalEntityType::class, $entityType);
}
}
Active
3.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.