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

generatorTest::testCreateObject()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 10
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 6
nc 2
nop 0
dl 0
loc 10
rs 10
c 0
b 0
f 0
1
<?php
2
3
/**
4
 * generatorTest.
5
 * @author Niklas Dougherty
6
 */
7
8
declare(strict_types=1);
9
10
namespace Tips\Tests\Funktioner;
11
12
use PHPUnit\Framework\TestCase;
13
use Tips\Klasser\Preludium;
14
15
/**
16
 * generatorTest.
17
 */
18
class generatorTest extends TestCase
19
{
20
	/**
21
	 * Construct object with argument and verify that the object has the expected properties.
22
	 */
23
	public function testCreateObject(): void
24
	{
25
		new Preludium();
26
		$rymd = [TECKENRYMD, TECKENRYMD, TECKENRYMD];
27
		$tipstecken = '';
28
		foreach (generera($rymd, 3) as $tecken) {
29
			$tipstecken .= $tecken;
30
		}
31
32
		$this->assertSame($tipstecken, '000001002010011012020021022100101102110111112120121122200201202210211212220221222');
33
		/**
34
		 * = 27 tipsrader med 3 tecken:
35
		 * 000 = 111
36
		 * 001
37
		 * 002
38
		 * 010
39
		 * 011
40
		 * 012
41
		 * 020
42
		 * 021
43
		 * 022
44
		 * 100
45
		 * 101
46
		 * 102
47
		 * 110
48
		 * 111 = XXX
49
		 * 112
50
		 * 120
51
		 * 121
52
		 * 122
53
		 * 200
54
		 * 201
55
		 * 202
56
		 * 210
57
		 * 211
58
		 * 212
59
		 * 220
60
		 * 221
61
		 * 222 = 222
62
		 */
63
	}
64
}
65