public static function MenuLinkMock::create in Drupal 8
Same name and namespace in other branches
- 9 core/tests/Drupal/Tests/Core/Menu/MenuLinkMock.php \Drupal\Tests\Core\Menu\MenuLinkMock::create()
Create an instance from a definition with at least id, title, route_name.
8 calls to MenuLinkMock::create()
- DefaultMenuLinkTreeManipulatorsTest::mockTree in core/
tests/ Drupal/ Tests/ Core/ Menu/ DefaultMenuLinkTreeManipulatorsTest.php - Creates a mock tree.
- DefaultMenuLinkTreeManipulatorsTest::testCheckNodeAccess in core/
tests/ Drupal/ Tests/ Core/ Menu/ DefaultMenuLinkTreeManipulatorsTest.php - Tests the optimized node access checking.
- MenuActiveTrailTest::provider in core/
tests/ Drupal/ Tests/ Core/ Menu/ MenuActiveTrailTest.php - Provides test data for all test methods.
- MenuLinkTreeElementTest::testConstruction in core/
tests/ Drupal/ Tests/ Core/ Menu/ MenuLinkTreeElementTest.php - Tests construction.
- MenuLinkTreeElementTest::testCount in core/
tests/ Drupal/ Tests/ Core/ Menu/ MenuLinkTreeElementTest.php - Tests count().
File
- core/
tests/ Drupal/ Tests/ Core/ Menu/ MenuLinkMock.php, line 41
Class
- MenuLinkMock
- Defines a mock implementation of a menu link used in tests only.
Namespace
Drupal\Tests\Core\MenuCode
public static function create($definition) {
return new static([], $definition['id'], $definition + static::$defaults);
}