protected function assertDate(Date $d, $year, $month, $day, $hour = null, $minute = null, $second = null) { $this->assertSame($year, $d->getYear(), 'Date->year'); $this->assertSame($month, $d->getMonth(), 'Date->month'); $this->assertSame($day, $d->getDay(), 'Date->day'); if ($hour !== null) { $this->assertSame($hour, $d->getHour(), 'Date->hour'); } if ($minute !== null) { $this->assertSame($minute, $d->getMinute(), 'Date->minute'); } if ($second !== null) { $this->assertSame($second, $d->getSecond(), 'Date->second'); } }