|
@@ 230-244 (lines=15) @@
|
| 227 |
|
$request->validate(); |
| 228 |
|
} |
| 229 |
|
|
| 230 |
|
public function testAddBinExceptionOuterWidth() |
| 231 |
|
{ |
| 232 |
|
$bin = new \BinPacking3d\Entity\Bin; |
| 233 |
|
$this->assertInstanceOf('\BinPacking3d\Entity\Bin', $bin); |
| 234 |
|
$bin->setWidth(50); |
| 235 |
|
$bin->setOuterWidth(51); |
| 236 |
|
$this->assertEquals(50, $bin->getWidth()); |
| 237 |
|
$this->assertEquals(51, $bin->getOuterWidth()); |
| 238 |
|
$this->assertGreaterThan($bin->getWidth(), $bin->getOuterWidth()); |
| 239 |
|
|
| 240 |
|
$bin = new \BinPacking3d\Entity\Bin; |
| 241 |
|
$this->assertInstanceOf('\BinPacking3d\Entity\Bin', $bin); |
| 242 |
|
$this->setExpectedException('Exception'); |
| 243 |
|
$bin->setOuterWidth(100); |
| 244 |
|
} |
| 245 |
|
|
| 246 |
|
// tests |
| 247 |
|
|
|
@@ 248-262 (lines=15) @@
|
| 245 |
|
|
| 246 |
|
// tests |
| 247 |
|
|
| 248 |
|
public function testAddBinExceptionOuterDepth() |
| 249 |
|
{ |
| 250 |
|
$bin = new \BinPacking3d\Entity\Bin; |
| 251 |
|
$this->assertInstanceOf('\BinPacking3d\Entity\Bin', $bin); |
| 252 |
|
$bin->setDepth(50); |
| 253 |
|
$bin->setOuterDepth(51); |
| 254 |
|
$this->assertEquals(50, $bin->getDepth()); |
| 255 |
|
$this->assertEquals(51, $bin->getOuterDepth()); |
| 256 |
|
$this->assertGreaterThan($bin->getDepth(), $bin->getOuterDepth()); |
| 257 |
|
|
| 258 |
|
$bin = new \BinPacking3d\Entity\Bin; |
| 259 |
|
$this->assertInstanceOf('\BinPacking3d\Entity\Bin', $bin); |
| 260 |
|
$this->setExpectedException('Exception'); |
| 261 |
|
$bin->setOuterDepth(100); |
| 262 |
|
} |
| 263 |
|
|
| 264 |
|
public function testAddBinExceptionOuterHeight() |
| 265 |
|
{ |
|
@@ 264-278 (lines=15) @@
|
| 261 |
|
$bin->setOuterDepth(100); |
| 262 |
|
} |
| 263 |
|
|
| 264 |
|
public function testAddBinExceptionOuterHeight() |
| 265 |
|
{ |
| 266 |
|
$bin = new \BinPacking3d\Entity\Bin; |
| 267 |
|
$this->assertInstanceOf('\BinPacking3d\Entity\Bin', $bin); |
| 268 |
|
$bin->setHeight(50); |
| 269 |
|
$bin->setOuterHeight(51); |
| 270 |
|
$this->assertEquals(50, $bin->getHeight()); |
| 271 |
|
$this->assertEquals(51, $bin->getOuterHeight()); |
| 272 |
|
$this->assertGreaterThan($bin->getHeight(), $bin->getOuterHeight()); |
| 273 |
|
|
| 274 |
|
$bin = new \BinPacking3d\Entity\Bin; |
| 275 |
|
$this->assertInstanceOf('\BinPacking3d\Entity\Bin', $bin); |
| 276 |
|
$this->setExpectedException('Exception'); |
| 277 |
|
$bin->setOuterHeight(100); |
| 278 |
|
} |
| 279 |
|
|
| 280 |
|
} |
| 281 |
|
|