PHP Classes

File: tests/Fakerino/Test/Core/RegEx/Exception/InvalidRegexExceptionTest.php

Recommend this page to a friend!
  Classes of Nicola Pietroluongo  >  Fakerino  >  tests/Fakerino/Test/Core/RegEx/Exception/InvalidRegexExceptionTest.php  >  Download  
File: tests/Fakerino/Test/Core/RegEx/Exception/InvalidRegexExceptionTest.php
Role: Unit test script
Content type: text/plain
Description: Unit test script
Class: Fakerino
Generate fake names and other types of fake data
Author: By
Last change:
Date: 6 years ago
Size: 836 bytes
 

Contents

Class file image Download
<?php
/**
 * This file is part of the Fakerino package.
 *
 * (c) Nicola Pietroluongo <nik.longstone@gmail.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Fakerino\Test\Core\RegEx\Exception;

use
Fakerino\Core\RegEx\Exception\InvalidRegexException;

/**
 * Class InvalidRegexException,
 * appears when the format of the regular expression is not valid.
 *
 * @author Nicola Pietroluongo <nik.longstone@gmail.com>
 */
class InvalidRegexExceptionTest extends \PHPUnit_Framework_TestCase
{

    public function
testInvalidRegexException()
    {
       
$e = new InvalidRegexException('foo');

       
$this->assertEquals('The format of the regular expression "foo" is invalid', $e->getMessage(), 'A message should be generated');
    }
}

For more information send a message to info at phpclasses dot org.