1
1
Fork 0
mirror of https://code.mensbeam.com/MensBeam/Arsse.git synced 2024-12-22 21:22:40 +00:00
Arsse/tests/TestException.php
2017-02-09 23:05:13 -05:00

45 lines
837 B
PHP

<?php
declare(strict_types=1);
namespace JKingWeb\NewsSync;
class TestException extends \PHPUnit\Framework\TestCase {
use TestingHelpers;
static function setUpBeforeClass() {
Lang::set("");
}
static function tearDownAfterClass() {
Lang::set(Lang::DEFAULT);
}
function testBasic() {
$this->assertException("unknown");
throw new Exception("unknown");
}
/**
* @depends testBasic
*/
function testPlain() {
$this->assertException("unknown");
throw new Exception();
}
/**
* @depends testBasic
*/
function testNamespace() {
$this->assertException("fileMissing", "Lang");
throw new Lang\Exception("fileMissing");
}
/**
* @depends testNamespace
*/
function testValues() {
$this->assertException("fileMissing", "Lang");
throw new Lang\Exception("fileMissing", "en");
}
}