/** * Tests whether the Subreddit creatiion schedule is correctly transformed * into a DateInterval object. */ public function testGetCreationIntervalAsDateInterval() { $subreddit = new Subreddit(); $subreddit->setName(rand(0, 1000)); $subreddit->setDomain(rand(0, 1000)); $subreddit->setCreateNewEpisodesCronFormatted('0 0 1 * *'); $subreddit->save(); $creation_internal = $subreddit->getCreationIntervalAsDateInterval(); $this->assertTrue($creation_internal instanceof DateInterval); $subreddit->delete(); }