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);
 }
Example #2
0
 public static function Instance()
 {
     if (self::$ndate == null) {
         self::$ndate = new NullDate();
     }
     return self::$ndate;
 }
Example #3
0
 public function Date()
 {
     return NullDate::Instance();
 }
Example #4
0
 public function testNullDateTests()
 {
     $null = NullDate::Instance();
     $this->assertNull($null->ToDatabase());
     $this->assertEquals($null, $null->ToTimezone('anything'));
 }