DiceGraphicTest::testCreateDiceGraphic()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
eloc 5
c 1
b 0
f 1
nc 1
nop 0
dl 0
loc 8
rs 10
1
<?php
2
3
namespace App\Dice;
4
5
use PHPUnit\Framework\TestCase;
6
7
/**
8
 * Test cases for class DiceGraphic.
9
 */
10
class DiceGraphicTest extends TestCase
11
{
12
    /**
13
     * Construct object without input arguments and verify that the object has the expected
14
     * properties.
15
     */
16
    public function testCreateDiceGraphic(): void
17
    {
18
        $die = new DiceGraphic();
19
        $this->assertInstanceOf("\App\Dice\DiceGraphic", $die);
20
21
        $die->roll();
22
        $res = $die->getAsString();
23
        $this->assertNotEmpty($res);
24
    }
25
}
26