];
}
+ /**
+ * Tests the isInternal() method.
+ */
+ public function testIsInternal() {
+ $entity_type = $this->setUpEntityType(['internal' => TRUE]);
+ $this->assertTrue($entity_type->isInternal());
+ $entity_type = $this->setUpEntityType(['internal' => FALSE]);
+ $this->assertFalse($entity_type->isInternal());
+ $entity_type = $this->setUpEntityType([]);
+ $this->assertFalse($entity_type->isInternal());
+ }
+
/**
* Tests the isRevisionable() method.
*/
$this->assertEquals('200 entity test plural entities', $entity_type->getCountLabel(200));
}
+ /**
+ * Tests the ::getBundleLabel() method.
+ *
+ * @covers ::getBundleLabel
+ * @dataProvider providerTestGetBundleLabel
+ */
+ public function testGetBundleLabel($definition, $expected) {
+ $entity_type = $this->setUpEntityType($definition);
+ $entity_type->setStringTranslation($this->getStringTranslationStub());
+ $this->assertEquals($expected, $entity_type->getBundleLabel());
+ }
+
+ /**
+ * Provides test data for ::testGetBundleLabel().
+ */
+ public function providerTestGetBundleLabel() {
+ return [
+ [['label' => 'Entity Label Foo'], 'Entity Label Foo bundle'],
+ [['bundle_label' => 'Bundle Label Bar'], 'Bundle Label Bar'],
+ ];
+ }
+
/**
* Gets a mock controller class name.
*