PHP Classes

File: tests/Jaguar/Tests/Drawable/Style/DashedlineStyleTest.php

Recommend this page to a friend!
  Classes of Hyyan Abo Fakher   Jaguar   tests/Jaguar/Tests/Drawable/Style/DashedlineStyleTest.php   Download  
File: tests/Jaguar/Tests/Drawable/Style/DashedlineStyleTest.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/Drawable/Style/DashedlineStyleTest.php
Date: 5 months ago
Size: 1,505 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\Drawable\Style;

use
Jaguar\Tests\Drawable\AbstractStyleTest;
use
Jaguar\Drawable\Style\DashedlineStyle;

class
DashedlineStyleTest extends AbstractStyleTest
{

    public function
testApply()
    {
       
$dl = new DashedlineStyle();
       
$this->assertInstanceOf(
               
'\Jaguar\Color\StyledColor'
               
, $dl->apply($this->getCanvas(), $this->getDrawable())
        );
    }

   
/**
     * @expectedException \Jaguar\Exception\DrawableException
     */
   
public function testApplyThrowDrawableException()
    {
       
$dl = new DashedlineStyle();
       
$dl->apply(new \Jaguar\Tests\Mock\CanvasMock(), $this->getDrawable());
    }

   
/**
     * @expectedException \InvalidArgumentException
     */
   
public function testSetFisrtColorShowTimeThrowInvalidArgumentException()
    {
        new
DashedlineStyle(-5);
    }

   
/**
     * @expectedException \InvalidArgumentException
     */
   
public function testSetSecondColorShowTimeThrowInvalidArgumentException()
    {
        new
DashedlineStyle(5, -5);
    }

    public function
testClone()
    {
       
$dl = new DashedlineStyle();
       
$clone = clone $dl;

       
$this->assertNotSame($dl->getSecondColor(), $clone->getSecondColor());
    }

}