PHP Classes

File: tests/Jaguar/Tests/Action/OverlayTest.php

Recommend this page to a friend!
  Classes of Hyyan Abo Fakher   Jaguar   tests/Jaguar/Tests/Action/OverlayTest.php   Download  
File: tests/Jaguar/Tests/Action/OverlayTest.php
Role: Unit test script
Content type: text/plain
Description: Class source
Class: Jaguar
Draw graphics and manipulate images
Author: By
Last change: Update of tests/Jaguar/Tests/Action/OverlayTest.php
Date: 11 months ago
Size: 1,319 bytes
 

Contents

Class file image Download
<?php

/*
 * This file is part of the Jaguar package.
 * (c) Hyyan Abo Fakher <tiribthea4hyyan@gmail.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Jaguar\Tests\Action;

use
Jaguar\Action\Overlay;
use
Jaguar\Box;

class
OverlayTest extends AbstractActionTest
{

    public function
getAction()
    {
       
$c = $this->getCanvas();

        return new
Overlay($c, 75, new Box($c->getDimension()));
    }

   
/**
     * @expectedException \RuntimeException
     */
   
public function testCloneThrowRuntimeException()
    {
        clone
$this->getAction();
    }

   
/**
     * @dataProvider mountsProvider
     * @expectedException \InvalidArgumentException
     *
     * @param integer $mount
     */
   
public function testSetMountThrowInvalieArgumentException($mount)
    {
       
$this->getAction()->setAmount($mount);
    }

   
/**
     * Overlay Mounts provider
     * @return type
     */
   
public function mountsProvider()
    {
        return array(
            array(-
5), array(200)
        );
    }

    public function
testApply()
    {
       
$this->assertInstanceOf(
               
'\Jaguar\Action\Overlay'
               
, $this->getAction()->apply($this->getCanvas())
        );
    }

}