2016-02-13 16:28:28 +00:00
|
|
|
<?php namespace phpunit;
|
|
|
|
|
2016-10-18 17:09:47 +00:00
|
|
|
class Error extends \PHPUnit_Framework_TestCase{
|
2016-02-13 16:28:28 +00:00
|
|
|
|
|
|
|
/* [1] Test de toutes les erreurs
|
|
|
|
=========================================================*/
|
|
|
|
public function testErrorSuccess(){
|
2016-10-18 17:09:47 +00:00
|
|
|
$error = \error\core\Error::Success;
|
2016-02-13 16:28:28 +00:00
|
|
|
|
2016-10-18 17:09:47 +00:00
|
|
|
$this->assertNotNull( \error\core\Error::explicit($error) );
|
2016-02-13 16:28:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public function testErrorParsingFailed(){
|
2016-10-18 17:09:47 +00:00
|
|
|
$error = \error\core\Error::ParsingFailed;
|
2016-02-13 16:28:28 +00:00
|
|
|
|
2016-10-18 17:09:47 +00:00
|
|
|
$this->assertNotNull( \error\core\Error::explicit($error) );
|
2016-02-13 16:28:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public function testErrorInvalidFlags(){
|
2016-10-18 17:09:47 +00:00
|
|
|
$error = \error\core\Error::InvalidFlags;
|
2016-02-13 16:28:28 +00:00
|
|
|
|
2016-10-18 17:09:47 +00:00
|
|
|
$this->assertNotNull( \error\core\Error::explicit($error) );
|
2016-02-13 16:28:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public function testErrorUnreachableResource(){
|
2016-10-18 17:09:47 +00:00
|
|
|
$error = \error\core\Error::UnreachableResource;
|
2016-02-13 16:28:28 +00:00
|
|
|
|
2016-10-18 17:09:47 +00:00
|
|
|
$this->assertNotNull( \error\core\Error::explicit($error) );
|
2016-02-13 16:28:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public function testErrorMissingPath(){
|
2016-10-18 17:09:47 +00:00
|
|
|
$error = \error\core\Error::MissingPath;
|
2016-02-13 16:28:28 +00:00
|
|
|
|
2016-10-18 17:09:47 +00:00
|
|
|
$this->assertNotNull( \error\core\Error::explicit($error) );
|
2016-02-13 16:28:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public function testErrorWrongPathModule(){
|
2016-10-18 17:09:47 +00:00
|
|
|
$error = \error\core\Error::WrongPathModule;
|
2016-02-13 16:28:28 +00:00
|
|
|
|
2016-10-18 17:09:47 +00:00
|
|
|
$this->assertNotNull( \error\core\Error::explicit($error) );
|
2016-02-13 16:28:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public function testErrorUnknownModule(){
|
2016-10-18 17:09:47 +00:00
|
|
|
$error = \error\core\Error::UnknownModule;
|
2016-02-13 16:28:28 +00:00
|
|
|
|
2016-10-18 17:09:47 +00:00
|
|
|
$this->assertNotNull( \error\core\Error::explicit($error) );
|
2016-02-13 16:28:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public function testErrorUnknownMethod(){
|
2016-10-18 17:09:47 +00:00
|
|
|
$error = \error\core\Error::UnknownMethod;
|
2016-02-13 16:28:28 +00:00
|
|
|
|
2016-10-18 17:09:47 +00:00
|
|
|
$this->assertNotNull( \error\core\Error::explicit($error) );
|
2016-02-13 16:28:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public function testErrorUncallableMethod(){
|
2016-10-18 17:09:47 +00:00
|
|
|
$error = \error\core\Error::UncallableMethod;
|
2016-02-13 16:28:28 +00:00
|
|
|
|
2016-10-18 17:09:47 +00:00
|
|
|
$this->assertNotNull( \error\core\Error::explicit($error) );
|
2016-02-13 16:28:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public function testErrorParamError(){
|
2016-10-18 17:09:47 +00:00
|
|
|
$error = \error\core\Error::ParamError;
|
2016-02-13 16:28:28 +00:00
|
|
|
|
2016-10-18 17:09:47 +00:00
|
|
|
$this->assertNotNull( \error\core\Error::explicit($error) );
|
2016-02-13 16:28:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public function testErrorModuleError(){
|
2016-10-18 17:09:47 +00:00
|
|
|
$error = \error\core\Error::ModuleError;
|
2016-02-13 16:28:28 +00:00
|
|
|
|
2016-10-18 17:09:47 +00:00
|
|
|
$this->assertNotNull( \error\core\Error::explicit($error) );
|
2016-02-13 16:28:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public function testErrorWrongPathRepo(){
|
2016-10-18 17:09:47 +00:00
|
|
|
$error = \error\core\Error::WrongPathRepo;
|
2016-02-13 16:28:28 +00:00
|
|
|
|
2016-10-18 17:09:47 +00:00
|
|
|
$this->assertNotNull( \error\core\Error::explicit($error) );
|
2016-02-13 16:28:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public function testErrorUnknownRepo(){
|
2016-10-18 17:09:47 +00:00
|
|
|
$error = \error\core\Error::UnknownRepo;
|
2016-02-13 16:28:28 +00:00
|
|
|
|
2016-10-18 17:09:47 +00:00
|
|
|
$this->assertNotNull( \error\core\Error::explicit($error) );
|
2016-02-13 16:28:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public function testErrorRepoError(){
|
2016-10-18 17:09:47 +00:00
|
|
|
$error = \error\core\Error::RepoError;
|
2016-02-13 16:28:28 +00:00
|
|
|
|
2016-10-18 17:09:47 +00:00
|
|
|
$this->assertNotNull( \error\core\Error::explicit($error) );
|
2016-02-13 16:28:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public function testErrorPDOConnection(){
|
2016-10-18 17:09:47 +00:00
|
|
|
$error = \error\core\Error::PDOConnection;
|
2016-02-13 16:28:28 +00:00
|
|
|
|
2016-10-18 17:09:47 +00:00
|
|
|
$this->assertNotNull( \error\core\Error::explicit($error) );
|
2016-02-13 16:28:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public function testErrorNotKnown(){
|
|
|
|
$error = 1239;
|
|
|
|
|
2016-10-18 17:09:47 +00:00
|
|
|
$this->assertNull( \error\core\Error::explicit($error) );
|
2016-02-13 16:28:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
?>
|