SMMP/phpunit/tests/ManagerError.php

107 lines
2.6 KiB
PHP
Executable File

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