public function testAlignToMinutesInterval() { $subject = new LocalDate('2016-01-01T00:00:00', 'Europe/Berlin'); $this->assertEquals(new LocalDate('2016-01-01T00:00:00', 'Europe/Berlin'), $subject->alignToMinutesInterval(0)); $this->assertEquals(new LocalDate('2016-01-01T00:00:00', 'Europe/Berlin'), $subject->alignToMinutesInterval(7)); $this->assertEquals(new LocalDate('2016-01-01T00:00:00', 'Europe/Berlin'), $subject->alignToMinutesInterval(60)); $this->assertEquals(new LocalDate('2016-01-01T00:00:00', 'Europe/Berlin'), $subject->alignToMinutesInterval(1440)); $subject = new LocalDate('2016-01-01T00:00:06', 'Europe/Berlin'); $this->assertEquals(new LocalDate('2016-01-01T00:00:00', 'Europe/Berlin'), $subject->alignToMinutesInterval(7)); $subject = new LocalDate('2016-01-01T00:07:00', 'Europe/Berlin'); $this->assertEquals(new LocalDate('2016-01-01T00:07:00', 'Europe/Berlin'), $subject->alignToMinutesInterval(7)); $subject = new LocalDate('2016-01-01T00:08:00', 'Europe/Berlin'); $this->assertEquals(new LocalDate('2016-01-01T00:07:00', 'Europe/Berlin'), $subject->alignToMinutesInterval(7)); $subject = new LocalDate('2016-01-01T00:13:00', 'Europe/Berlin'); $this->assertEquals(new LocalDate('2016-01-01T00:07:00', 'Europe/Berlin'), $subject->alignToMinutesInterval(7)); $subject = new LocalDate('2016-01-01T00:14:00', 'Europe/Berlin'); $this->assertEquals(new LocalDate('2016-01-01T00:14:00', 'Europe/Berlin'), $subject->alignToMinutesInterval(7)); $subject = new LocalDate('2016-01-01T00:15:00', 'Europe/Berlin'); $this->assertEquals(new LocalDate('2016-01-01T00:14:00', 'Europe/Berlin'), $subject->alignToMinutesInterval(7)); }