示例#1
0
 public function testBasicHandleRequest()
 {
     $o = new NotFoundProcessor();
     $oModel = $o->handleRequest(vsc::getEnv()->getHttpRequest());
     $this->assertInstanceOf(ErrorModel::class, $oModel);
     $this->assertInstanceOf(ExceptionResponseError::class, $oModel->getException());
     $this->assertEquals(HttpResponseType::NOT_FOUND, $oModel->getException()->getErrorCode());
 }
示例#2
0
 public function testBasic__construct()
 {
     $o = new NotFoundProcessor();
     $this->assertInstanceOf(ErrorMap::class, $o->getMap());
     $this->assertEquals('templates', basename($o->getMap()->getTemplatePath()));
     $this->assertEquals('error.tpl.php', $o->getMap()->getTemplate());
     $oModel = $o->getModel();
     $this->assertInstanceOf(ExceptionResponseError::class, $oModel->getException());
     $this->assertEquals(HttpResponseType::NOT_FOUND, $oModel->getException()->getErrorCode());
 }