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

TestSuiteFactoryTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 1
eloc 7
c 1
b 0
f 1
dl 0
loc 10
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A testCreate() 0 7 1
1
<?php
2
declare(strict_types=1);
3
4
namespace MyTester;
5
6
use MyTester\Attributes\TestSuite;
7
8
/**
9
 * Test suite for class TestSuiteFactory
10
 *
11
 * @author Jakub Konečný
12
 */
13
#[TestSuite("TestSuiteFactoryTest")]
14
final class TestSuiteFactoryTest extends TestCase
15
{
16
    public function testCreate(): void
17
    {
18
        $factory = new TestSuiteFactory();
19
        $this->assertType(static::class, $factory->create(static::class));
20
        $this->assertThrowsException(function () use ($factory) {
21
            $factory->create(\stdClass::class);
22
        }, InvalidTestCaseException::class, "stdClass is not a descendant of MyTester\\TestCase.");
23
    }
24
}
25