| Conditions | 1 |
| Paths | 1 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 10 | function testDistanceFare() { |
||
|
|
|||
| 11 | $method = $this->objFromFixture("DistanceShippingMethod", "ds"); |
||
| 12 | $this->assertEquals(0, $method->getDistanceFare(9)); |
||
| 13 | $this->assertEquals(0, $method->getDistanceFare(0.5)); |
||
| 14 | $this->assertEquals(234, $method->getDistanceFare(150)); |
||
| 15 | $this->assertEquals(678, $method->getDistanceFare(999999)); |
||
| 16 | |||
| 17 | //TODO: what if distane can't be calculated? |
||
| 18 | //what if warehouse can't be found? |
||
| 19 | //what if address is invalid? |
||
| 20 | } |
||
| 21 | |||
| 38 | } |
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.