Exemplo n.º 1
0
 public function testBadData()
 {
     authorizeFromEnv();
     try {
         CleverDistrict::all(array('asdf' => 25));
     } catch (CleverInvalidRequestError $e) {
         $this->assertEquals(400, $e->getHttpStatus());
     }
 }
Exemplo n.º 2
0
 public function testInvalidCredentials()
 {
     Clever::setApiKey('invalid');
     try {
         CleverDistrict::all();
     } catch (CleverAuthenticationError $e) {
         $this->assertEquals(401, $e->getHttpStatus());
     }
 }
Exemplo n.º 3
0
 public static function init()
 {
     self::$secondLevelEndpoints = array('schools' => array(), 'teachers' => array(), 'students' => array(), 'sections' => array(), 'events' => array());
 }
Exemplo n.º 4
0
 /**
  * @expectedException UndefinedEndpointException
  */
 public function testUndefinedSecondLevel()
 {
     $districts = CleverDistrict::all(array('limit' => 1));
     $district = $districts[0];
     $objs = $district->eventz();
 }