Passed
Push — main ( 36bb88...fbfcc4 )
by Alexandra
03:15
created

GildedRoseCombinationsTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 9
dl 0
loc 17
rs 10
c 1
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A testUpdateQualityWithCombinations() 0 15 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace AHJ\ApprovalTests\Tests\Example;
6
7
use AHJ\ApprovalTests\CombinationApprovals;
8
use PHPUnit\Framework\TestCase;
9
10
final class GildedRoseCombinationsTest extends TestCase
11
{
12
    public function testUpdateQualityWithCombinations(): void
13
    {
14
        $arguments = [
15
            ['foo', 'Aged Brie'],
16
            [3],
17
            [15],
18
        ];
19
20
        CombinationApprovals::create()->verifyAllCombinations(
21
            function (string $name, int $sellIn, int $quantity) {
22
                $items = [new Item($name, $sellIn, $quantity)];
23
24
                return (new GildedRose())->updateQuality($items);
25
            },
26
            $arguments
27
        );
28
    }
29
}
30