public function EntityLoadHelperTest::testEntityExistsReturnsTrueWhenAnEntityIsLoaded in YAML Content 8
Test entityExists method returns true when an entity is loaded.
@covers ::entityExists
File
- tests/
src/ Unit/ EntityLoadHelper/ EntityLoadHelperTest.php, line 107
Class
- EntityLoadHelperTest
- Test functionality of the EntityLoadHelper class.
Namespace
Drupal\Tests\yaml_content\Unit\EntityLoadHelperCode
public function testEntityExistsReturnsTrueWhenAnEntityIsLoaded() {
// Mock the load helper for testing.
$this->loadHelper = $this
->getEntityLoadHelperMock([
'loadEntity',
]);
$this->loadHelper
->method('loadEntity')
->willReturn($this
->getEntityMock());
$this
->assertTrue($this->loadHelper
->entityExists('test_entity', []));
}