Subversion Repository Public Repository

Nextrek

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<?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());
    }
}

Commits for Nextrek/Aiba_backup/vendor/intervention/image/tests/ChecksumCommandTest.php

Diff revisions: vs.
Revision Author Commited Message
1464 MOliva picture MOliva Tue 13 Oct, 2020 11:16:56 +0000