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()); } }
public static function init() { self::$secondLevelEndpoints = array('schools' => array(), 'teachers' => array(), 'students' => array(), 'sections' => array(), 'events' => array()); }
/** * @expectedException UndefinedEndpointException */ public function testUndefinedSecondLevel() { $districts = CleverDistrict::all(array('limit' => 1)); $district = $districts[0]; $objs = $district->eventz(); }