NxTIC/phpunit/tests/ManagerError.php

107 lines
2.8 KiB
PHP
Raw Permalink Normal View History

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