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

46 lines
837 B
PHP
Raw Normal View History

2017-02-10 04:05:13 +00:00
<?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");
}
}