Пример #1
0
 /**
  * @param string $twilioAuthToken
  *
  * @return null|SurveyResponse
  */
 public function handleRequest($twilioAuthToken)
 {
     $service = new SurveyRequestService();
     if (self::validateRequest($twilioAuthToken)) {
         $success = $service->service();
         return $service->getResponse();
     }
     return null;
 }
Пример #2
0
 function testSessionAssignment()
 {
     //Verify that if we do not pass in null values,
     //that it creates pointers to the session and request objects
     $_SESSION = array();
     $manager = new SurveyRequestService();
     $ses = $manager->getSession();
     $this->assertNotNull($ses);
     $this->assertFalse(array_key_exists('foobar', $ses));
     $_SESSION['foobar'] = "hello!";
     $ses = $manager->getSession();
     $this->assertEquals("hello!", $ses["foobar"]);
 }