public function ExtraFieldManagerBaseTest::testAllEntityBundles in Extra Field 8.2
@covers ::allEntityBundles
@dataProvider allEntityBundlesProvider
Parameters
string $entityType: The entity type for which to get the bundles.
string $bundleType: The entity bundle type.
array $entityBundles: Structured array of entity bundles. Keys and values are equal.
array $result: The entity bundles as returned by ::allEntityBundles.
File
- tests/
src/ Unit/ ExtraFieldManagerBaseTest.php, line 232
Class
- ExtraFieldManagerBaseTest
- @coversDefaultClass \Drupal\extra_field\Plugin\ExtraFieldManagerBase
Namespace
Drupal\Tests\extra_field\UnitCode
public function testAllEntityBundles($entityType, $bundleType, array $entityBundles, array $result) {
$this->baseManager
->expects($this
->any())
->method('getEntityBundleType')
->will($this
->returnValue($bundleType));
$this->baseManager
->expects($this
->any())
->method('getEntityBundles')
->will($this
->returnValue($entityBundles));
$allEntityBundles = self::callMethod($this->baseManager, 'allEntityBundles', [
$entityType,
]);
$this
->assertEquals($result, $allEntityBundles);
}