/** @test */ public function a_schedule_has_a_start_time() { $startTime = new DateTimeImmutable('2015-03-10'); $schedule = Schedule::withStartTime($startTime); $this->assertInstanceOf(Schedule::class, $schedule); $this->assertEquals($startTime, $schedule->startTime()); $this->assertNull($schedule->endTime()); }
/** * Creates an ActivityPlanned event given an id and some options. * The options array can override the given default values. */ private function socialActivityWasPlanned(ActivityId $id, array $options = []) : ActivityPlanned { $options = array_merge(['schedule' => Schedule::withStartTime(new DateTimeImmutable('2015-10-01 14:30')), 'category' => Activity::SOCIAL], $options); return new ActivityPlanned($id, 'Crash & Compile', 'Programming competition', $options['schedule'], Location::fromNameAndAddress('Francken kamer'), $options['category']); }
protected function createInstance() { return new ActivityPlanned(ActivityId::generate(), 'Crash & Compile', 'Programming competition', Schedule::withStartTime(new DateTimeImmutable('2015-10-01 14:30')), Location::fromNameAndAddress('Francken kamer'), Activity::SOCIAL); }