Code Duplication    Length = 13-14 lines in 2 locations

spec/Conf/LibrariesSpec.php 1 location

@@ 37-50 (lines=14) @@
34
        $library->code->shouldBe($libraryCode);
35
    }
36
37
    function it_provides_libraries(AlmaClient $client, UriInterface $url)
38
    {
39
        $client->buildUrl('/conf/libraries', [])
40
            ->shouldBeCalled()
41
            ->willReturn($url);
42
43
        $client->getJSON($url)
44
            ->shouldBeCalled()
45
            ->willReturn(SpecHelper::getDummyData('libraries_response.json'));
46
47
        $this->shouldHaveCount(27);
48
        $this->all()->shouldBeArray();
49
        $this->all()[0]->shouldBeAnInstanceOf(Library::class);
50
    }
51
}
52

spec/Conf/LocationsSpec.php 1 location

@@ 31-43 (lines=13) @@
28
        $location->code->shouldBe($code);
29
    }
30
31
    function it_provides_locations(AlmaClient $client, UriInterface $url)
32
    {
33
        $client->buildUrl('/conf/libraries/LIB_CODE/locations', [])
34
            ->shouldBeCalled()
35
            ->willReturn($url);
36
37
        $client->getJSON($url)
38
            ->shouldBeCalled()
39
            ->willReturn(SpecHelper::getDummyData('locations_response.json'));
40
41
        $this->all()->shouldBeArray();
42
        $this->all()[0]->shouldBeAnInstanceOf(Location::class);
43
    }
44
45
}
46