public static function fromEventDescriptionDefinitions(array $anEventDescriptionDefinitionCollection) { $eventDescriptions = array(); foreach ($anEventDescriptionDefinitionCollection as $eventName => $structurePathValueTypeList) { Assertion::string($eventName, sprintf("EventName must be a string: %s given in EventDescriptionDefinitionCollection: %s", Util::getType($eventName), json_encode($anEventDescriptionDefinitionCollection))); $eventDescriptions[$eventName] = EventDescription::fromNameAndStructurePathValueTypeList($eventName, $structurePathValueTypeList); } return new static($eventDescriptions); }
/** * @test */ public function is_not_same_value_as() { $eventDescription = EventDescription::fromNameAndStructurePathValueTypeList('Eventname', array('property' => 'string')); $otherEventDescription = EventDescription::fromNameAndStructurePathValueTypeList('Other', array('property' => 'string')); $this->assertFalse($eventDescription->sameValueAs($otherEventDescription)); }