/** * 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']); }
/** @test */ public function a_location_can_be_serialized_and_deserialized() { $location = Location::fromNameAndAddress('Francken Kamer', '9742GS', 'Nijenborgh', '4'); $this->assertEquals($location, Location::deserialize($location->serialize())); }
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); }