File: ExampleFinderTest.php

package info (click to toggle)
php-phpdocumentor-reflection-docblock 5.6.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,416 kB
  • sloc: php: 9,035; xml: 67; makefile: 54
file content (44 lines) | stat: -rw-r--r-- 1,018 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?php

declare(strict_types=1);

namespace phpDocumentor\Reflection\DocBlock;

use Mockery as m;
use phpDocumentor\Reflection\DocBlock\Tags\Example;
use PHPUnit\Framework\TestCase;

/**
 * @coversDefaultClass \phpDocumentor\Reflection\DocBlock\ExampleFinder
 * @covers ::<private>
 */
class ExampleFinderTest extends TestCase
{
    private ExampleFinder $fixture;

    /**
     * Call Mockery::close after each test.
     */
    public function tearDown(): void
    {
        m::close();
    }

    public function setUp(): void
    {
        $this->fixture = new ExampleFinder();
    }

    /**
     * @uses \phpDocumentor\Reflection\DocBlock\Tags\Example
     * @uses \phpDocumentor\Reflection\DocBlock\Description
     *
     * @covers ::find
     * @covers ::getSourceDirectory
     */
    public function testFileNotFound(): void
    {
        $example = new Example('./example.php', false, 1, 0, 'Test');
        $this->assertSame('** File not found : ./example.php **', $this->fixture->find($example));
    }
}