SMMP/phpunit/tests/ManagerError.php

107 lines
2.6 KiB
PHP
Raw Permalink Normal View History

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