Passed
Push — master ( b0febc...99b0a5 )
by Jakub
01:55
created

anonymous//tests/BaseTestSuitesFinderTest.php$0   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 2
c 1
b 0
f 1
dl 0
loc 10
rs 10
1
<?php
2
declare(strict_types=1);
3
4
namespace MyTester;
5
6
use MyTester\Attributes\TestSuite;
7
8
/**
9
 * Test suite for class BaseTestSuitesFinder
10
 *
11
 * @author Jakub Konečný
12
 */
13
#[TestSuite("BaseTestSuitesFinderTest")]
14
final class BaseTestSuitesFinderTest extends TestCase
15
{
16
    public function testIsTestSuite(): void
17
    {
18
        $testSuitesFinder = new class extends BaseTestSuitesFinder
19
        {
20
            public function getSuites(string $folder): array
0 ignored issues
show
introduced by
The method parameter $folder is never used
Loading history...
21
            {
22
                return [];
23
            }
24
25
            public function isTestSuite(string $class): bool
0 ignored issues
show
introduced by
Possible useless method overriding detected
Loading history...
26
            {
27
                return parent::isTestSuite($class);
28
            }
29
        };
30
        $this->assertFalse($testSuitesFinder->isTestSuite("abcdefg"));
31
        $this->assertFalse($testSuitesFinder->isTestSuite(TestSuite::class));
32
        $this->assertTrue($testSuitesFinder->isTestSuite(static::class));
33
    }
34
}
35