You are here

protected function FileTest::getPlugin in Freelinking 4.0.x

Same name and namespace in other branches
  1. 8.3 tests/src/Unit/Plugin/freelinking/FileTest.php \Drupal\Tests\freelinking\Unit\Plugin\freelinking\FileTest::getPlugin()

Get the plugin to test.

Return value

\Drupal\freelinking\Plugin\freelinking\File The file plugin.

4 calls to FileTest::getPlugin()
FileTest::testBuildLink in tests/src/Unit/Plugin/freelinking/FileTest.php
Assert that buildLink is functional.
FileTest::testDefaultConfiguration in tests/src/Unit/Plugin/freelinking/FileTest.php
Assert that defaultConfiguration is functional.
FileTest::testGetIndicator in tests/src/Unit/Plugin/freelinking/FileTest.php
Assert that getIndicator is functional.
FileTest::testGetTip in tests/src/Unit/Plugin/freelinking/FileTest.php
Assert that getTip is functional.

File

tests/src/Unit/Plugin/freelinking/FileTest.php, line 167

Class

FileTest
Tests the freelinking file plugin.

Namespace

Drupal\Tests\freelinking\Unit\Plugin\freelinking

Code

protected function getPlugin() {
  $plugin_definition = [
    'id' => 'file',
    'title' => 'File',
    'hidden' => FALSE,
    'weight' => 0,
    'settings' => [
      'scheme' => 'public',
    ],
  ];
  return File::create($this->container, [
    'settings' => [
      'scheme' => 'public',
    ],
  ], 'file', $plugin_definition);
}