protected function SqlTest::setupViewWithRelationships in Drupal 10
Same name and namespace in other branches
- 8 core/modules/views/tests/src/Unit/Plugin/query/SqlTest.php \Drupal\Tests\views\Unit\Plugin\query\SqlTest::setupViewWithRelationships()
- 9 core/modules/views/tests/src/Unit/Plugin/query/SqlTest.php \Drupal\Tests\views\Unit\Plugin\query\SqlTest::setupViewWithRelationships()
Create a view with a relationship.
4 calls to SqlTest::setupViewWithRelationships()
- SqlTest::testLoadEntitiesWithNonEntityRelationship in core/
modules/ views/ tests/ src/ Unit/ Plugin/ query/ SqlTest.php - @covers ::loadEntities @covers ::assignEntitiesToResult
- SqlTest::testLoadEntitiesWithRelationship in core/
modules/ views/ tests/ src/ Unit/ Plugin/ query/ SqlTest.php - @covers ::loadEntities @covers ::assignEntitiesToResult
- SqlTest::testLoadEntitiesWithRelationshipAndRevision in core/
modules/ views/ tests/ src/ Unit/ Plugin/ query/ SqlTest.php - @covers ::loadEntities @covers ::assignEntitiesToResult
- SqlTest::testLoadEntitiesWithRevisionOfSameEntityType in core/
modules/ views/ tests/ src/ Unit/ Plugin/ query/ SqlTest.php - @covers ::loadEntities @covers ::assignEntitiesToResult
File
- core/
modules/ views/ tests/ src/ Unit/ Plugin/ query/ SqlTest.php, line 317
Class
- SqlTest
- @coversDefaultClass \Drupal\views\Plugin\views\query\Sql
Namespace
Drupal\Tests\views\Unit\Plugin\queryCode
protected function setupViewWithRelationships(ViewExecutable $view, $base = 'entity_second') {
// We don't use prophecy, because prophecy enforces methods.
$relationship = $this
->getMockBuilder(RelationshipPluginBase::class)
->disableOriginalConstructor()
->getMock();
$relationship->definition['base'] = $base;
$relationship->tableAlias = $base;
$relationship->alias = $base;
$view->relationship[$base] = $relationship;
}