function ConfigEntityBaseUnitTest::testToArraySchemaException
@covers ::toArray
      
    
File
- 
              core/
tests/ Drupal/ Tests/ Core/ Config/ Entity/ ConfigEntityBaseUnitTest.php, line 634  
Class
- ConfigEntityBaseUnitTest
 - @coversDefaultClass \Drupal\Core\Config\Entity\ConfigEntityBase[[api-linebreak]] @group Config
 
Namespace
Drupal\Tests\Core\Config\EntityCode
public function testToArraySchemaException() {
  $this->entityType
    ->expects($this->any())
    ->method('getPropertiesToExport')
    ->willReturn(NULL);
  $this->expectException(SchemaIncompleteException::class);
  $this->expectExceptionMessageRegExp("/Entity type 'Mock_ConfigEntityTypeInterface_[^']*' is missing 'config_export' definition in its annotation/");
  $this->entity
    ->toArray();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.