You are here

protected function PatternBaseTest::getUiPatternBaseMock in UI Patterns 8

Get PatternBase mock.

Parameters

array $plugin_definition: Plugin definition.

array $methods: List of methods to mock.

Return value

\PHPUnit\Framework\MockObject\MockObject Mock object.

1 call to PatternBaseTest::getUiPatternBaseMock()
PatternBaseTest::testHookLibraryInfoBuild in tests/src/Kernel/Plugin/PatternBaseTest.php
Test hookLibraryInfoBuild.

File

tests/src/Kernel/Plugin/PatternBaseTest.php, line 52

Class

PatternBaseTest
@coversDefaultClass \Drupal\ui_patterns\Plugin\PatternBase

Namespace

Drupal\Tests\ui_patterns\Kernel\Plugin

Code

protected function getUiPatternBaseMock(array $plugin_definition = [], array $methods = []) {
  return $this
    ->getMockForAbstractClass(PatternBase::class, [
    [],
    'plugin_id',
    $plugin_definition,
    \Drupal::service('app.root'),
    \Drupal::service('module_handler'),
  ], '', TRUE, TRUE, TRUE, $methods);
}