PetTest::testGetCombatEffects()   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 0
Metric Value
eloc 5
c 1
b 0
f 0
dl 0
loc 8
rs 10
cc 1
nc 1
nop 0
1
<?php
2
declare(strict_types=1);
3
4
namespace HeroesofAbenez\Combat;
5
6
require __DIR__ . "/../../bootstrap.php";
7
8
use Tester\Assert;
9
10
/**
11
 * @author Jakub Konečný
12
 * @testCase
13
 */
14
final class PetTest extends \Tester\TestCase
15
{
16
    public function testGetCombatEffects(): void
17
    {
18
        $pet = new Pet([
19
            "id" => 1, "deployed" => false, "bonusStat" => Character::STAT_STRENGTH, "bonusValue" => 10,
20
        ]);
21
        Assert::count(0, $pet->getCombatEffects());
22
        $pet->deployed = true;
23
        Assert::count(1, $pet->getCombatEffects());
24
    }
25
}
26
27
$test = new PetTest();
28
$test->run();
29