public function ConfigListerTest::testListTypes in Configuration Update Manager 8
@covers \Drupal\config_update\ConfigListerWithProviders::listTypes
File
- tests/
src/ Unit/ ConfigListerTest.php, line 222
Class
- ConfigListerTest
- Tests the \Drupal\config_update\ConfigListerWithProviders class.
Namespace
Drupal\Tests\config_update\UnitCode
public function testListTypes() {
$return = $this->configLister
->listTypes();
// Should return an array in sorted order, of just the config entities
// that $this->getEntityManagerMock() set up.
$expected = [
'bar' => 'foo.barbaz',
'baz' => 'baz.foo',
'foo' => 'foo.bar',
];
$this
->assertEquals(array_keys($return), array_keys($expected));
foreach ($return as $key => $definition) {
$this
->assertTrue($definition
->entityClassImplements('Drupal\\Core\\Config\\Entity\\ConfigEntityInterface'));
$this
->assertEquals($definition
->getConfigPrefix(), $expected[$key]);
}
}