/** * @test */ public function it_constructs_a_prototype() { $stringPrototype = String::prototype(); $this->assertEquals('Prooph\\Done\\Process\\Type\\String', $stringPrototype->of()); $description = $stringPrototype->typeDescription(); $this->assertEquals('String', $description->label()); $this->assertEquals('string', $description->nativeType()); $this->assertFalse($description->hasIdentifier()); }
/** * Returns the prototype of the items type * * A collection has always one property with name item representing the type of all items in the collection. * * @return Prototype */ public static function itemPrototype() { return String::prototype(); }
/** * @return array[propertyName => Prototype] */ public static function getPropertyPrototypes() { return array('street' => String::prototype(), 'streetNumber' => Integer::prototype(), 'zip' => String::prototype(), 'city' => String::prototype()); }
/** * @return array[propertyName => Prototype] */ public static function getPropertyPrototypes() { return array('id' => Integer::prototype(), 'name' => String::prototype(), 'address' => AddressDictionary::prototype()); }