home
/
zktecojo
/
public_html
/
vendor
/
intervention
/
image
/
tests
➕ New
📤 Upload
✎ Editing:
ChecksumCommandTest.php
← Back
<?php use Intervention\Image\Commands\ChecksumCommand; class ChecksumCommandTest extends PHPUnit_Framework_TestCase { public function tearDown() { Mockery::close(); } public function testExecute() { $size = Mockery::mock('Intervention\Image\Size', array(3, 3)); $color = array(0,0,0,1); $resource = imagecreatefrompng(__DIR__.'/images/tile.png'); $image = Mockery::mock('Intervention\Image\Image'); $image->shouldReceive('getSize')->once()->andReturn($size); $image->shouldReceive('pickColor')->times(9)->andReturn($color); $command = new ChecksumCommand(array()); $result = $command->execute($image); $this->assertTrue($result); $this->assertTrue($command->hasOutput()); $this->assertEquals('ec9cbdb71be04e26b4a89333f20c273b', $command->getOutput()); } }
💾 Save Changes
Cancel
📤 Upload File
×
Select File
Upload
Cancel
➕ Create New
×
Type
📄 File
📁 Folder
Name
Create
Cancel
✎ Rename Item
×
Current Name
New Name
Rename
Cancel
🔐 Change Permissions
×
Target File
Permission (e.g., 0755, 0644)
0755
0644
0777
Apply
Cancel