You are here

public function MockFileFinderTest::testFindFile in Drupal 10

Same name and namespace in other branches
  1. 8 core/tests/Drupal/Tests/Component/Annotation/MockFileFinderTest.php \Drupal\Tests\Component\Annotation\MockFileFinderTest::testFindFile()
  2. 9 core/tests/Drupal/Tests/Component/Annotation/MockFileFinderTest.php \Drupal\Tests\Component\Annotation\MockFileFinderTest::testFindFile()

@covers ::create @covers ::findFile

File

core/tests/Drupal/Tests/Component/Annotation/MockFileFinderTest.php, line 18

Class

MockFileFinderTest
@coversDefaultClass \Drupal\Component\Annotation\Reflection\MockFileFinder @group Annotation

Namespace

Drupal\Tests\Component\Annotation

Code

public function testFindFile() {
  $tmp = MockFileFinder::create('testfilename.txt');
  $this
    ->assertEquals('testfilename.txt', $tmp
    ->findFile('n/a'));
  $this
    ->assertEquals('testfilename.txt', $tmp
    ->findFile('SomeClass'));
}