| Conditions | 1 |
| Paths | 1 |
| Total Lines | 20 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 16 | public function testProductWeightValidation() |
||
| 17 | { |
||
| 18 | |||
| 19 | $product = $this->objFromFixture('ShippableProduct', 'product1'); |
||
| 20 | |||
| 21 | $product->Weight = -5.6; |
||
| 22 | $this->setExpectedException('ValidationException'); |
||
|
|
|||
| 23 | $product->write(); |
||
| 24 | |||
| 25 | $product->Weight = 0; |
||
| 26 | $this->setExpectedException('ValidationException'); |
||
| 27 | $product->write(); |
||
| 28 | |||
| 29 | $product->Weight = 10.5; |
||
| 30 | $product->write(); |
||
| 31 | |||
| 32 | $productCheck = ShippableProduct::get()->byID($product->ID); |
||
| 33 | $this->assertEquals($productCheck->Weight, 10.5); |
||
| 34 | |||
| 35 | } |
||
| 36 | } |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.