public function ConfigEntityBaseUnitTest::testToArraySchemaFallback in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityBaseUnitTest.php \Drupal\Tests\Core\Config\Entity\ConfigEntityBaseUnitTest::testToArraySchemaFallback()
@covers ::toArray
File
- core/
tests/ Drupal/ Tests/ Core/ Config/ Entity/ ConfigEntityBaseUnitTest.php, line 523 - Contains \Drupal\Tests\Core\Config\Entity\ConfigEntityBaseUnitTest.
Class
- ConfigEntityBaseUnitTest
- @coversDefaultClass \Drupal\Core\Config\Entity\ConfigEntityBase @group Config
Namespace
Drupal\Tests\Core\Config\EntityCode
public function testToArraySchemaFallback() {
$this->typedConfigManager
->expects($this
->once())
->method('getDefinition')
->will($this
->returnValue(array(
'mapping' => array(
'id' => '',
'dependencies' => '',
),
)));
$this->entityType
->expects($this
->any())
->method('getPropertiesToExport')
->willReturn([]);
$properties = $this->entity
->toArray();
$this
->assertInternalType('array', $properties);
$this
->assertEquals(array(
'id' => $this->entity
->id(),
'dependencies' => array(),
), $properties);
}