public function testAddsAnnouncement() { $text = 'text'; $start = Date::Parse('2011-01-01', 'America/Chicago'); $end = NullDate::Instance(); $priority = 1; $announcement = Announcement::Create($text, $start, $end, $priority); $this->repository->Add($announcement); $this->assertEquals(new AddAnnouncementCommand($text, $start, $end, $priority), $this->db->_LastCommand); }
public static function Instance() { if (self::$ndate == null) { self::$ndate = new NullDate(); } return self::$ndate; }
public function Date() { return NullDate::Instance(); }
public function testNullDateTests() { $null = NullDate::Instance(); $this->assertNull($null->ToDatabase()); $this->assertEquals($null, $null->ToTimezone('anything')); }