PHP Classes

File: tests/Proxy/ImagineProxyTest.php

Recommend this page to a friend!
  Packages of Kacper Rowinski   OneClickCaptcha   tests/Proxy/ImagineProxyTest.php   Download  
File: tests/Proxy/ImagineProxyTest.php
Role: Unit test script
Content type: text/plain
Description: Unit test script
Class: OneClickCaptcha
CAPTCHA validation based on user clicks on circles
Author: By
Last change: Update of tests/Proxy/ImagineProxyTest.php
Date: 2 days ago
Size: 1,306 bytes
 

Contents

Class file image Download
<?php

declare(strict_types=1);

namespace
Proxy;

use
Imagine\Image\Box;
use
Imagine\Image\ImagineInterface;
use
Imagine\Image\Palette\RGB;
use
Imagine\Image\Point;
use
OneClickCaptcha\Proxy\ImageProxy;
use
PHPUnit\Framework\TestCase;

class
ImagineProxyTest extends TestCase
{
   
/**
     * @var ImageProxy
     */
   
private ImageProxy $imagineProxy;

    protected function
setUp(): void
   
{
       
$stub = $this->getMockBuilder(ImagineInterface::class)
            ->
disableOriginalConstructor()
            ->
getMock();

       
$this->imagineProxy = new ImageProxy($stub);
    }

   
/**
     *
     */
   
public function testShouldReturnInstanceOfBox(): void
   
{
       
$this->assertInstanceOf(Box::class, $this->imagineProxy->getBox(1, 1));
    }

   
/**
     *
     */
   
public function testShouldReturnInstanceOfPoint(): void
   
{
       
$this->assertInstanceOf(Point::class, $this->imagineProxy->getPoint(1, 1));
    }

   
/**
     *
     */
   
public function testShouldReturnInstanceOfRGB(): void
   
{
       
$this->assertInstanceOf(RGB::class, $this->imagineProxy->getRGB());
    }

   
/**
     *
     */
   
public function testShouldReturnInstanceOfImagine(): void
   
{
       
$this->assertInstanceOf(ImagineInterface::class, $this->imagineProxy->getImage());
    }
}