Conditions | 1 |
Paths | 1 |
Total Lines | 14 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
1 | <?php |
||
31 | public function testUpdate() |
||
32 | { |
||
33 | $name = 'name - testMetadataUpdate'; |
||
34 | $this->bundle->create($name, $this->media); |
||
35 | $this->assertEquals(201, $this->bundle->getStatusCode()); |
||
36 | $location = $this->bundle->location; |
||
37 | |||
38 | $params = array('data' => '{"name" : "value"}', 'id' => $location); |
||
39 | $result = $this->bundle->metadata->update($params); |
||
40 | $this->assertTrue($result); |
||
41 | |||
42 | $this->assertTrue($this->bundle->delete($location)); |
||
43 | $this->assertEquals(204, $this->bundle->getStatusCode()); |
||
44 | } |
||
45 | } |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: