Code Duplication    Length = 10-11 lines in 4 locations

spec/Bibs/BibsSpec.php 2 locations

@@ 22-31 (lines=10) @@
19
        $client->sru = $sru;
20
    }
21
22
    public function it_provides_a_lazy_interface_to_bib_objects(AlmaClient $client)
23
    {
24
        SpecHelper::expectNoRequests($client);
25
26
        $mms_id = '123'; // str_random();
27
        $bib = $this->get($mms_id);
28
29
        $bib->shouldHaveType(Bib::class);
30
        $bib->mms_id->shouldBe($mms_id);
31
    }
32
33
    public function it_provides_a_lazy_array_interface_to_bib_objects(AlmaClient $client)
34
    {
@@ 33-42 (lines=10) @@
30
        $bib->mms_id->shouldBe($mms_id);
31
    }
32
33
    public function it_provides_a_lazy_array_interface_to_bib_objects(AlmaClient $client)
34
    {
35
        SpecHelper::expectNoRequests($client);
36
37
        $mms_id = '123'; // str_random();
38
        $bib = $this[$mms_id];
39
40
        $bib->shouldHaveType(Bib::class);
41
        $bib->mms_id->shouldBe($mms_id);
42
    }
43
44
    public function it_accepts_expand_parameter(AlmaClient $client)
45
    {

spec/Bibs/HoldingsSpec.php 2 locations

@@ 44-54 (lines=11) @@
41
        $holding->holding_id->shouldBe($holding_id);
42
    }
43
44
    public function it_provides_a_lazy_array_interface_to_holding_objects(AlmaClient $client, Bib $bib)
45
    {
46
        SpecHelper::expectNoRequests($client);
47
48
        $holding_id = '90123'; // str_random();
49
        $holding = $this[$holding_id];
50
51
        $holding->shouldHaveType(Holding::class);
52
        $holding->bib->shouldBe($bib);
53
        $holding->holding_id->shouldBe($holding_id);
54
    }
55
56
    public function it_is_countable(AlmaClient $client)
57
    {
@@ 32-42 (lines=11) @@
29
            ->willReturn(SpecHelper::getDummyData('holdings_response.json'));
30
    }
31
32
    public function it_provides_a_lazy_interface_to_holding_objects(AlmaClient $client, Bib $bib)
33
    {
34
        SpecHelper::expectNoRequests($client);
35
36
        $holding_id = '12345'; // str_random();
37
        $holding = $this->get($holding_id);
38
39
        $holding->shouldHaveType(Holding::class);
40
        $holding->bib->shouldBe($bib);
41
        $holding->holding_id->shouldBe($holding_id);
42
    }
43
44
    public function it_provides_a_lazy_array_interface_to_holding_objects(AlmaClient $client, Bib $bib)
45
    {