function testNext() { $response = $this->response('scheduler_next.json'); $this->expect_Curl_jsonRequest()->with('GET', 'https://test.hypercharge.net/v2/scheduler/e1420438c52b4cb3a03a14a7e4fc16e1/next')->andReturn($response); $next = Scheduler::next('e1420438c52b4cb3a03a14a7e4fc16e1'); $this->assertEqual('2014-06-02', $next); }
function testNextForDeactivated() { $scheduler = $this->testCreate(); $uid = $scheduler->unique_id; $this->mockV2Url(array('scheduler', $uid)); $s = Scheduler::deactivate($uid); $this->mockV2Url(array('scheduler', $uid, 'next')); $date = Scheduler::next($uid); $this->assertIdentical(null, $date); }