Example #1
0
 public function testProcessNonexistentUser()
 {
     $user = $this->getMockUser();
     $mail = new CM_Mail_ExampleMailable($user);
     $site = CM_Site_Abstract::factory();
     $render = new CM_Frontend_Render(new CM_Frontend_Environment($site));
     $request = new CM_Http_Request_Get($render->getUrlEmailTracking($mail), ['host' => $site->getHost()]);
     $response = CM_Http_Response_EmailTracking::createFromRequest($request, $site, $this->getServiceManager());
     $user->delete();
     try {
         $response->process();
         $this->fail('Expected exception not thrown');
     } catch (CM_Exception_Nonexistent $e) {
         $this->assertSame(CM_Exception::WARN, $e->getSeverity());
     }
 }