| @@ 57-64 (lines=8) @@ | ||
| 54 | ])); |
|
| 55 | } |
|
| 56 | ||
| 57 | public function test_scale_down() { |
|
| 58 | $sourceFile = $this->createSourceFile(); |
|
| 59 | $imageObject = $this->createImageObject(); |
|
| 60 | ||
| 61 | $sizes = $this->scaler->scale($sourceFile, $imageObject); |
|
| 62 | ||
| 63 | $this->assertTrue(count($sizes) > 1); |
|
| 64 | } |
|
| 65 | ||
| 66 | public function test_scale_down_with_max_width() { |
|
| 67 | $sourceFile = $this->createSourceFile(); |
|
| @@ 78-86 (lines=9) @@ | ||
| 75 | } |
|
| 76 | } |
|
| 77 | ||
| 78 | public function test_scale_down_with_max_filesize() { |
|
| 79 | $sourceFile = $this->createSourceFile(); |
|
| 80 | $imageObject = $this->createImageObject(); |
|
| 81 | ||
| 82 | $this->scaler->setMaxFileSize(100000); |
|
| 83 | $sizes = $this->scaler->scale($sourceFile, $imageObject); |
|
| 84 | ||
| 85 | $this->assertCount(3, $sizes); |
|
| 86 | } |
|
| 87 | ||
| 88 | // TODO: test algorithm |
|
| 89 | ||
| @@ 59-66 (lines=8) @@ | ||
| 56 | ])); |
|
| 57 | } |
|
| 58 | ||
| 59 | public function test_scale_down() { |
|
| 60 | $sourceFile = $this->createSourceFile(); |
|
| 61 | $imageObject = $this->createImageObject(); |
|
| 62 | ||
| 63 | $sizes = $this->scaler->scale($sourceFile, $imageObject); |
|
| 64 | ||
| 65 | $this->assertTrue(count($sizes) > 1); |
|
| 66 | } |
|
| 67 | ||
| 68 | public function test_scale_down_with_max_width() { |
|
| 69 | $sourceFile = $this->createSourceFile(); |
|