function DisplayVariantTest::setUpDisplayVariant
Same name in other branches
- 9 core/tests/Drupal/Tests/Core/Display/DisplayVariantTest.php \Drupal\Tests\Core\Display\DisplayVariantTest::setUpDisplayVariant()
- 8.9.x core/tests/Drupal/Tests/Core/Display/DisplayVariantTest.php \Drupal\Tests\Core\Display\DisplayVariantTest::setUpDisplayVariant()
- 10 core/tests/Drupal/Tests/Core/Display/DisplayVariantTest.php \Drupal\Tests\Core\Display\DisplayVariantTest::setUpDisplayVariant()
Sets up a display variant plugin for testing.
Parameters
array $configuration: An array of plugin configuration.
array $definition: The plugin definition array.
Return value
\Drupal\Core\Display\VariantBase|\PHPUnit\Framework\MockObject\MockObject A mocked display variant plugin.
7 calls to DisplayVariantTest::setUpDisplayVariant()
- DisplayVariantTest::testAccess in core/
tests/ Drupal/ Tests/ Core/ Display/ DisplayVariantTest.php - Tests the access() method.
- DisplayVariantTest::testGetConfiguration in core/
tests/ Drupal/ Tests/ Core/ Display/ DisplayVariantTest.php - Tests the getConfiguration() method.
- DisplayVariantTest::testGetWeight in core/
tests/ Drupal/ Tests/ Core/ Display/ DisplayVariantTest.php - Tests the getWeight() method.
- DisplayVariantTest::testGetWeightDefault in core/
tests/ Drupal/ Tests/ Core/ Display/ DisplayVariantTest.php - Tests the getWeight() method using a default value.
- DisplayVariantTest::testLabel in core/
tests/ Drupal/ Tests/ Core/ Display/ DisplayVariantTest.php - Tests the label() method.
File
-
core/
tests/ Drupal/ Tests/ Core/ Display/ DisplayVariantTest.php, line 27
Class
- DisplayVariantTest
- @coversDefaultClass \Drupal\Core\Display\VariantBase @group Display
Namespace
Drupal\Tests\Core\DisplayCode
public function setUpDisplayVariant($configuration = [], $definition = []) {
return $this->getMockBuilder('Drupal\\Core\\Display\\VariantBase')
->setConstructorArgs([
$configuration,
'test',
$definition,
])
->onlyMethods([
'build',
])
->getMock();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.