public function testShouldNotMapIgnoredMembers() { // arrange $engine = new Engine(); $engine->createMap(Source::className(), Destination::className())->forMember('value', new Ignore()); // act /** @var Destination $destination */ $destination = $engine->map(new Source())->toType(Destination::className()); // assert $this->assertNull($destination->value); }
/** * @return \yii\db\ActiveQuery */ public function getSource() { return $this->hasOne(Source::className(), ['id' => 'sourceId']); }