forked from OPL/opl3-autoloader
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<?php | ||
/** | ||
* Unit tests for Open Power Autoloader | ||
* | ||
* @author Tomasz "Zyx" Jędrzejewski | ||
* @copyright Copyright (c) 2009 Invenzzia Group | ||
* @license http://www.invenzzia.org/license/new-bsd New BSD License | ||
*/ | ||
namespace TestSuite; | ||
use Opl\Autoloader\Exception\TranslationException; | ||
use Opl\Autoloader\Exception\FileNotFoundException; | ||
use Opl\Autoloader\Exception\FileFormatException; | ||
use RuntimeException; | ||
|
||
/** | ||
* @covers Opl\Autoloader\Exception\TranslationException | ||
* @covers Opl\Autoloader\Exception\FileNotFoundException | ||
* @covers Opl\Autoloader\Exception\FileFormatException | ||
*/ | ||
class ExceptionTest extends \PHPUnit_Framework_TestCase | ||
{ | ||
public function testTranslationException() | ||
{ | ||
$exception = new TranslationException('Foo'); | ||
$this->assertEquals('Foo', $exception->getMessage()); | ||
$this->assertTrue($exception instanceof RuntimeException); | ||
} // end testTranslationException(); | ||
|
||
public function testFileNotFoundException() | ||
{ | ||
$exception = new FileNotFoundException('Foo'); | ||
$this->assertEquals('Foo', $exception->getMessage()); | ||
$this->assertTrue($exception instanceof RuntimeException); | ||
} // end testFileNotFoundException(); | ||
|
||
public function testFileFormatException() | ||
{ | ||
$exception = new FileFormatException('Foo'); | ||
$this->assertEquals('Foo', $exception->getMessage()); | ||
$this->assertTrue($exception instanceof RuntimeException); | ||
} // end testFileFormatException(); | ||
} // end ExceptionTest; |