function SqlContentEntityStorageTest::testGetBaseTable

Same name in other branches
  1. 8.9.x core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageTest.php \Drupal\Tests\Core\Entity\Sql\SqlContentEntityStorageTest::testGetBaseTable()
  2. 10 core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageTest.php \Drupal\Tests\Core\Entity\Sql\SqlContentEntityStorageTest::testGetBaseTable()
  3. 11.x core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageTest.php \Drupal\Tests\Core\Entity\Sql\SqlContentEntityStorageTest::testGetBaseTable()

Tests SqlContentEntityStorage::getBaseTable().

@covers ::__construct @covers ::getBaseTable

@dataProvider providerTestGetBaseTable

Parameters

string $base_table: The base table to be returned by the mocked entity type.

string $expected: The expected return value of SqlContentEntityStorage::getBaseTable().

File

core/tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageTest.php, line 156

Class

SqlContentEntityStorageTest
@coversDefaultClass \Drupal\Core\Entity\Sql\SqlContentEntityStorage @group Entity

Namespace

Drupal\Tests\Core\Entity\Sql

Code

public function testGetBaseTable($base_table, $expected) {
    $this->entityType
        ->expects($this->once())
        ->method('getBaseTable')
        ->willReturn($base_table);
    $this->setUpEntityStorage();
    $this->assertSame($expected, $this->entityStorage
        ->getBaseTable());
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.