Completed
Push — master ( 28517b...4142e2 )
by Mike
13s queued 11s
created

ClassStringTest::provideClassStrings()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 7
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
declare(strict_types=1);
4
5
/**
6
 * This file is part of phpDocumentor.
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 *
11
 * @link      http://phpdoc.org
12
 */
13
14
namespace phpDocumentor\Reflection\Types;
15
16
use phpDocumentor\Reflection\Fqsen;
17
use PHPUnit\Framework\TestCase;
18
19
/**
20
 * @coversDefaultClass \phpDocumentor\Reflection\Types\ClassString
21
 */
22
class ClassStringTest extends TestCase
23
{
24
    /**
25
     * @dataProvider provideClassStrings
26
     * @covers ::__toString
27
     */
28
    public function testClassStringStringifyCorrectly(ClassString $array, string $expectedString) : void
29
    {
30
        $this->assertSame($expectedString, (string) $array);
31
    }
32
33
    /**
34
     * @return mixed[]
35
     */
36
    public function provideClassStrings() : array
37
    {
38
        return [
39
            'generic clss string' => [new ClassString(), 'class-string'],
40
            'typed class string' => [new ClassString(new Fqsen('\Foo\Bar')), 'class-string<\Foo\Bar>'],
41
        ];
42
    }
43
}
44