1 | <?php |
||
16 | class BibSpec extends ObjectBehavior |
||
17 | { |
||
18 | public function let(AlmaClient $client) |
||
19 | { |
||
20 | $this->beConstructedWith($client, '999104760474702204'); |
||
21 | } |
||
22 | |||
23 | protected function expectRequest($client) |
||
24 | { |
||
25 | $client->getXML('/bibs/999104760474702204') |
||
26 | ->shouldBeCalled() |
||
27 | ->willReturn(SpecHelper::getDummyData('bib_response_iz.xml')); |
||
28 | } |
||
29 | |||
30 | public function it_is_lazy(AlmaClient $client) |
||
31 | { |
||
32 | SpecHelper::expectNoRequests($client); |
||
33 | $this->shouldHaveType(Bib::class); |
||
34 | } |
||
35 | |||
36 | public function it_fetches_record_data_when_needed(AlmaClient $client) |
||
37 | { |
||
38 | $this->expectRequest($client); |
||
39 | |||
40 | $this->created_by->shouldBe('import'); |
||
|
|||
41 | $this->created_date->shouldBe('2015-11-05Z'); |
||
42 | } |
||
43 | |||
44 | public function it_can_exist(AlmaClient $client) |
||
50 | |||
51 | public function it_links_to_network_zone(AlmaClient $client, AlmaClient $nz, Bibs $bibs, Bib $nz_bib) |
||
63 | |||
64 | public function it_provides_lazy_access_to_holdings(AlmaClient $client) |
||
69 | |||
70 | public function it_has_a_MARC_record(AlmaClient $client) |
||
77 | |||
78 | public function it_can_be_edited(AlmaClient $client) |
||
89 | |||
90 | public function it_catches_resource_not_found(AlmaClient $client) |
||
98 | |||
99 | public function it_has_requests() |
||
103 | } |
||
104 |
Since your code implements the magic getter
_get
, this function will be called for any read access on an undefined variable. You can add the@property
annotation to your class or interface to document the existence of this variable.If the property has read access only, you can use the @property-read annotation instead.
Of course, you may also just have mistyped another name, in which case you should fix the error.
See also the PhpDoc documentation for @property.