/** * Tests ConfigEntityMapper::getTypeLabel(). */ public function testGetTypeLabel() { $entity_type = $this->getMock('Drupal\\Core\\Config\\Entity\\ConfigEntityTypeInterface'); $entity_type->expects($this->once())->method('getLabel')->will($this->returnValue('test')); $this->entityManager->expects($this->once())->method('getDefinition')->with('configurable_language')->will($this->returnValue($entity_type)); $result = $this->configEntityMapper->getTypeLabel(); $this->assertSame('test', $result); }