PHP Classes
elePHPant
Icontem

File: tests/org/majkel/tcpdfwarper/MissingArgExceptionTest.php

Recommend this page to a friend!
  Classes of Michal Kowalik  >  TCPDF Warper  >  tests/org/majkel/tcpdfwarper/MissingArgExceptionTest.php  >  Download  
File: tests/org/majkel/tcpdfwarper/MissingArgExceptionTest.php
Role: Unit test script
Content type: text/plain
Description: tests
Class: TCPDF Warper
Create PDF documents using TCPDF fluent interface
Author: By
Last change: test style compilant
Date: 4 years ago
Size: 851 bytes
 

 

Contents

Class file image Download
<?php
/**
 * Created by PhpStorm.
 * Package: org\majkel\tcpdfwarper
 * User: Micha? (majkel) Kowalik <maf.michal@gmail.com>
 * Date: 12/28/2014
 * Time: 22:36
 */

namespace org\majkel\tcpdfwarper;

/**
 * Class MissingArgExceptionTest
 * @package org\majkel\tcpdfwarper
 * @coversDefaultClass \org\majkel\tcpdfwarper\MissingArgExceptionTest
 */
class MissingArgExceptionTest extends \PHPUnit_Framework_TestCase {

    public function
testException() {
       
$previous = new \Exception();
       
$code = 123;
       
$argument = 'argument';
       
$message = sprintf(MissingArgException::MESSAGE, $argument);

       
$e = new MissingArgException($argument, $code, $previous);

       
self::assertSame($previous, $e->getPrevious());
       
self::assertSame($code, $e->getCode());
       
self::assertSame($argument, $e->getArgumentName());
       
self::assertSame($message, $e->getMessage());
    }

}