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