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

TestSuiteFactoryTest::testCreate()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 5
c 1
b 0
f 1
dl 0
loc 7
rs 10
cc 1
nc 1
nop 0
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