public function testGetSleepSeconds() { $this->schedule->expects($this->once())->method('getMatchedRule')->with($this->time)->will($this->returnValue($this->rule)); $this->rule->expects($this->once())->method('getSeconds')->will($this->returnValue(10)); $this->assertEquals(10, $this->smart_sleep->getSleepSeconds($this->time)); }