getType()); self::assertNull($instance->type); $instance->fromArray(array('type' => $value)); self::assertSame($value, $instance->getType()); self::assertSame($value, $instance->type); } /** * @dataProvider validDataProvider */ public function testFromArray($value) { $instance = new SelfEmployedConfirmation(); $instance->fromArray(array('type' => $value)); self::assertSame($value, $instance->getType()); self::assertSame($value, $instance->type); } public function validDataProvider() { $result = array(); foreach (SelfEmployedConfirmationType::getValidValues() as $value) { $result[] = array($value); } return $result; } }