芝麻web文件管理V1.00
编辑当前文件:/home/royashxg/bit-alphas-ltd.com/user/project/vendor/league/glide/tests/Manipulators/BlurTest.php
manipulator = new Blur(); } public function tearDown(): void { Mockery::close(); } public function testCreateInstance() { $this->assertInstanceOf('League\Glide\Manipulators\Blur', $this->manipulator); } public function testRun() { $image = Mockery::mock('Intervention\Image\Image', function ($mock) { $mock->shouldReceive('blur')->with('10')->once(); }); $this->assertInstanceOf( 'Intervention\Image\Image', $this->manipulator->setParams(['blur' => 10])->run($image) ); } public function testGetBlur() { $this->assertSame(50, $this->manipulator->setParams(['blur' => '50'])->getBlur()); $this->assertSame(50, $this->manipulator->setParams(['blur' => 50])->getBlur()); $this->assertSame(null, $this->manipulator->setParams(['blur' => null])->getBlur()); $this->assertSame(null, $this->manipulator->setParams(['blur' => 'a'])->getBlur()); $this->assertSame(null, $this->manipulator->setParams(['blur' => '-1'])->getBlur()); $this->assertSame(null, $this->manipulator->setParams(['blur' => '101'])->getBlur()); } }