function testActivateThrowsIfInvalideUid() { $this->expectException('Hypercharge\\Errors\\ValidationError'); $this->expect_Curl_jsonRequest()->never(); $scheduler = Scheduler::activate('wrong'); }
function testDeactivateActivate() { $scheduler = $this->testCreate(); $uid = $scheduler->unique_id; $this->assertTrue($scheduler->active); $this->mockV2Url(array('scheduler', $uid)); $s = Scheduler::deactivate($uid); $this->assertFalse($s->active); $s = Scheduler::find($uid); $this->assertFalse($s->active); $s = Scheduler::activate($uid); $this->assertTrue($s->active); $s = Scheduler::find($uid); $this->assertTrue($s->active); }