| Conditions | 1 |
| Paths | 1 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 7 | function testClosestWarehouse() { |
||
|
|
|||
| 8 | |||
| 9 | $warehouse = Warehouse::closest_to( |
||
| 10 | $this->objFromFixture("Address", "customeraddress1") |
||
| 11 | ); |
||
| 12 | $this->assertEquals("Main warehouse", $warehouse->Title); |
||
| 13 | |||
| 14 | $warehouse = Warehouse::closest_to( |
||
| 15 | $this->objFromFixture("Address", "customeraddress2") |
||
| 16 | ); |
||
| 17 | $this->assertEquals("NSW depot", $warehouse->Title); |
||
| 18 | } |
||
| 19 | |||
| 20 | } |
Adding explicit visibility (
private,protected, orpublic) is generally recommend to communicate to other developers how, and from where this method is intended to be used.