MockFileFinderTest.php

Same filename and directory in other branches
  1. 10 core/tests/Drupal/Tests/Component/Annotation/MockFileFinderTest.php
  2. 9 core/tests/Drupal/Tests/Component/Annotation/MockFileFinderTest.php
  3. 8.9.x core/tests/Drupal/Tests/Component/Annotation/MockFileFinderTest.php

Namespace

Drupal\Tests\Component\Annotation

File

core/tests/Drupal/Tests/Component/Annotation/MockFileFinderTest.php

View source
<?php

declare (strict_types=1);
namespace Drupal\Tests\Component\Annotation;

use Drupal\Component\Annotation\Reflection\MockFileFinder;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\TestCase;

/**
 * Tests Drupal\Component\Annotation\Reflection\MockFileFinder.
 */
class MockFileFinderTest extends TestCase {
  
  /**
   * @legacy-covers ::create
   * @legacy-covers ::findFile
   */
  public function testFindFile() : void {
    $tmp = MockFileFinder::create('test_filename.txt');
    $this->assertEquals('test_filename.txt', $tmp->findFile('n/a'));
    $this->assertEquals('test_filename.txt', $tmp->findFile('SomeClass'));
  }

}

Classes

Title Deprecated Summary
MockFileFinderTest Tests Drupal\Component\Annotation\Reflection\MockFileFinder.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.