You are here

public static function MockFileFinder::create in Drupal 9

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Component/Annotation/Reflection/MockFileFinder.php \Drupal\Component\Annotation\Reflection\MockFileFinder::create()

Creates new mock file finder objects.

4 calls to MockFileFinder::create()
AnnotatedClassDiscovery::getDefinitions in core/lib/Drupal/Component/Annotation/Plugin/Discovery/AnnotatedClassDiscovery.php
Gets the definition of all plugins for this type.
AnnotatedClassDiscoveryAutomatedProviders::getDefinitions in core/modules/migrate/src/Plugin/Discovery/AnnotatedClassDiscoveryAutomatedProviders.php
Gets the definition of all plugins for this type.
MockFileFinderTest::testFindFile in core/tests/Drupal/Tests/Component/Annotation/MockFileFinderTest.php
@covers ::create @covers ::findFile
TestDiscovery::getTestClasses in core/lib/Drupal/Core/Test/TestDiscovery.php
Discovers all available tests in all extensions.

File

core/lib/Drupal/Component/Annotation/Reflection/MockFileFinder.php, line 34

Class

MockFileFinder
Defines a mock file finder that only returns a single filename.

Namespace

Drupal\Component\Annotation\Reflection

Code

public static function create($filename) {
  $object = new static();
  $object->filename = $filename;
  return $object;
}