You are here

protected function SqlContentEntityStorageSchemaTest::setUp in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageSchemaTest.php \Drupal\Tests\Core\Entity\Sql\SqlContentEntityStorageSchemaTest::setUp()

Overrides UnitTestCase::setUp

File

core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageSchemaTest.php, line 66
Contains \Drupal\Tests\Core\Entity\Sql\SqlContentEntityStorageSchemaTest.

Class

SqlContentEntityStorageSchemaTest
@coversDefaultClass \Drupal\Core\Entity\Sql\SqlContentEntityStorageSchema @group Entity

Namespace

Drupal\Tests\Core\Entity\Sql

Code

protected function setUp() {
  $this->entityManager = $this
    ->getMock('Drupal\\Core\\Entity\\EntityManagerInterface');
  $this->storage = $this
    ->getMockBuilder('Drupal\\Core\\Entity\\Sql\\SqlContentEntityStorage')
    ->disableOriginalConstructor()
    ->getMock();
  $this->storage
    ->expects($this
    ->any())
    ->method('getBaseTable')
    ->will($this
    ->returnValue('entity_test'));

  // Add an ID field. This also acts as a test for a simple, single-column
  // field.
  $this
    ->setUpStorageDefinition('id', array(
    'columns' => array(
      'value' => array(
        'type' => 'int',
      ),
    ),
  ));
}