You are here

protected function EntityLoadHelperTest::getEntityMock in YAML Content 8

Get a mock for an entity.

Return value

\PHPUnit_Framework_MockObject_MockObject|ContentEntityInterface

3 calls to EntityLoadHelperTest::getEntityMock()
EntityLoadHelperTest::testEntityExistsReturnsTrueWhenAnEntityIsLoaded in tests/src/Unit/EntityLoadHelper/EntityLoadHelperTest.php
Test entityExists method returns true when an entity is loaded.
EntityLoadHelperTest::testLoadEntityWithPropertiesdReturnsMatchedEntity in tests/src/Unit/EntityLoadHelper/EntityLoadHelperTest.php
Test that loadEntity returns matched entity if property searching returned a match.
EntityLoadHelperTest::testLoadEntityWithUuidReturnsMatchedEntity in tests/src/Unit/EntityLoadHelper/EntityLoadHelperTest.php
Test that loadEntity returns matched entity if UUID searching returned a match.

File

tests/src/Unit/EntityLoadHelper/EntityLoadHelperTest.php, line 605

Class

EntityLoadHelperTest
Test functionality of the EntityLoadHelper class.

Namespace

Drupal\Tests\yaml_content\Unit\EntityLoadHelper

Code

protected function getEntityMock() {
  $mock = $this
    ->getMockForAbstractClass(ContentEntityInterface::class);
  return $mock;
}