function it_should_transform_an_array_to_an_entity() { $context = new Context('id'); $class = self::className; $context->setTransformedData(new $class()); $entity = $this->transform([123, 'John', 'Smith'], $context); $entity->shouldHaveType(self::className); $entity->id->shouldBe(123); $entity->name->shouldBe('John'); $entity->surname->shouldBe('Smith'); }
public function __construct($execution, $metadata, $id = null) { $this->execution = $execution; $this->metadata = $metadata; parent::__construct($id); }
public function __construct($id = null, $tableName = null) { parent::__construct($id); $this->tableName = $tableName; }