Passed
Push — main ( 40d4d0...b1f2dd )
by N.
05:04
created

OmgangTest::testCreateObject()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 10

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 10
nc 1
nop 0
dl 0
loc 12
rs 9.9332
c 0
b 0
f 0
1
<?php
2
3
/**
4
 * Klass OmgangTest.
5
 * @author Niklas Dougherty
6
 */
7
8
declare(strict_types=1);
9
10
namespace Tips\Tests\Klasser;
11
12
use PHPUnit\Framework\TestCase;
13
use Tips\Klasser\Omgang;
14
use Tips\Klasser\Utdelning;
15
use Tips\Klasser\Spel;
16
use Tips\Klasser\Preludium;
17
use Tips\Klasser\Tips;
18
use Tips\Klasser\Generera;
19
use Tips\Klasser\Omgang\Uppmarkning;
20
21
/**
22
 * Klass OmgangTest.
23
 */
24
class OmgangTest extends TestCase
25
{
26
	/**
27
	 * Construct object with argument and verify that the object has the expected properties.
28
	 */
29
	public function testCreateObject(): void
30
	{
31
		new Preludium();
32
		$omg = new Omgang();
33
		$this->expectOutputRegex('*Resultat*');
34
		$this->assertInstanceOf("\Tips\Klasser\Omgang", $omg);
35
		$this->assertInstanceOf("\Tips\Klasser\Spel", $spel = new Spel());
36
		$this->assertInstanceOf("\Tips\Klasser\Tips", $tips = new Tips($spel));
37
		$this->assertObjectHasProperty('filnamn', $spel);
38
		$this->assertTrue($spel->omgång_existerar($spel->omgång));
39
		$this->assertInstanceOf("\Tips\Klasser\Omgang\Uppmarkning", new Uppmarkning($tips));
40
		$this->assertInstanceOf("\Tips\Klasser\Generera", new Generera($tips));
41
	}
42
}
43