|
@@ 233-239 (lines=7) @@
|
| 230 |
|
* @test |
| 231 |
|
* @covers ::resize |
| 232 |
|
*/ |
| 233 |
|
public function resizeWithColorOfBlur() |
| 234 |
|
{ |
| 235 |
|
$source = $this->getTestImage('portrait.jpg'); |
| 236 |
|
$actual = Image::resize($source, 1024, 768, ['upsize' => true, 'bestfit' => false, 'color' => 'blur']); |
| 237 |
|
$expected = $this->getTestImage('blur.jpg'); |
| 238 |
|
$this->assertSameImage($expected, $actual); |
| 239 |
|
} |
| 240 |
|
|
| 241 |
|
/** |
| 242 |
|
* @test |
|
@@ 245-251 (lines=7) @@
|
| 242 |
|
* @test |
| 243 |
|
* @covers ::resize |
| 244 |
|
*/ |
| 245 |
|
public function resizeWithBlurBackground() |
| 246 |
|
{ |
| 247 |
|
$source = $this->getTestImage('portrait.jpg'); |
| 248 |
|
$actual = Image::resize($source, 1024, 768, ['upsize' => true, 'bestfit' => false, 'blurBackground' => true]); |
| 249 |
|
$expected = $this->getTestImage('blur.jpg'); |
| 250 |
|
$this->assertSameImage($expected, $actual); |
| 251 |
|
} |
| 252 |
|
|
| 253 |
|
/** |
| 254 |
|
* @test |
|
@@ 257-264 (lines=8) @@
|
| 254 |
|
* @test |
| 255 |
|
* @covers ::resize |
| 256 |
|
*/ |
| 257 |
|
public function resizeWithBurredBackgroundWithCustomBlurValue() |
| 258 |
|
{ |
| 259 |
|
$source = $this->getTestImage('portrait.jpg'); |
| 260 |
|
$options = ['upsize' => true, 'bestfit' => false, 'blurBackground' => true, 'blurValue' => 30.0]; |
| 261 |
|
$actual = Image::resize($source, 1024, 768, $options); |
| 262 |
|
$expected = $this->getTestImage('blur-30.jpg'); |
| 263 |
|
$this->assertSameImage($expected, $actual); |
| 264 |
|
} |
| 265 |
|
|
| 266 |
|
/** |
| 267 |
|
* @test |