Test Setup Failed
Pull Request — master (#24)
by
unknown
05:52
created

CodeTablesSpec::let()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 1
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace spec\Scriptotek\Alma\CodeTables;
4
5
use PhpSpec\ObjectBehavior;
6
use Prophecy\Argument;
7
use Scriptotek\Alma\Conf\CodeTable;
8
use Scriptotek\Alma\Client as AlmaClient;
9
use spec\Scriptotek\Alma\SpecHelper;
10
11
class CodeTablesSpec extends ObjectBehavior
12
{
13
    public function let(AlmaClient $client)
14
    {
15
        $this->beConstructedWith($client);
16
    }
17
18 View Code Duplication
    public function it_provides_a_lazy_interface_to_codetable_objects(AlmaClient $client)
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
19
    {
20
        SpecHelper::expectNoRequests($client);
21
22
        $ctid = 'myCodeTable'; // str_random();
23
        $bib = $this->get($ctid);
24
25
        $bib->shouldHaveType(CodeTable::class);
26
        $bib->code->shouldBe($ctid);
27
    }
28
29 View Code Duplication
    public function it_provides_a_lazy_array_interface_to_codetable_objects(AlmaClient $client)
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
30
    {
31
        SpecHelper::expectNoRequests($client);
32
33
        $ctid = 'myCodeTable'; // str_random();
34
        $ct = $this[$ctid];
35
36
        $ct->shouldHaveType(CodeTable::class);
37
        $ct->code->shouldBe($ctid);
38
    }
39
40
}
41