You are here

public function ConfigEntityStorageTest::getMockEntity in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityStorageTest.php \Drupal\Tests\Core\Config\Entity\ConfigEntityStorageTest::getMockEntity()

Creates an entity with specific methods mocked.

Parameters

array $values: (optional) Values to pass to the constructor.

array $methods: (optional) The methods to mock.

Return value

\Drupal\Core\Entity\EntityInterface|\PHPUnit_Framework_MockObject_MockObject

7 calls to ConfigEntityStorageTest::getMockEntity()
ConfigEntityStorageTest::setUp in core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityStorageTest.php
@covers ::__construct
ConfigEntityStorageTest::testDelete in core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityStorageTest.php
@covers ::delete @covers ::doDelete
ConfigEntityStorageTest::testSaveChangedUuid in core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityStorageTest.php
@covers ::save @covers ::doSave
ConfigEntityStorageTest::testSaveDuplicate in core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityStorageTest.php
@covers ::save @covers ::doSave
ConfigEntityStorageTest::testSaveInvalid in core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityStorageTest.php
@covers ::save

... See full list

File

core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityStorageTest.php, line 942
Contains \Drupal\Tests\Core\Config\Entity\ConfigEntityStorageTest.

Class

ConfigEntityStorageTest
@coversDefaultClass \Drupal\Core\Config\Entity\ConfigEntityStorage @group Config

Namespace

Drupal\Tests\Core\Config\Entity

Code

public function getMockEntity(array $values = array(), $methods = array()) {
  return $this
    ->getMockForAbstractClass('Drupal\\Core\\Config\\Entity\\ConfigEntityBase', array(
    $values,
    'test_entity_type',
  ), '', TRUE, TRUE, TRUE, $methods);
}