/** @test */ public function TestMapping() { /*// checks that the property map was able to rename the properties when they were created on this new object. //*/ $Object = new RegionTest($this->Input); foreach (RegionTest::$PropertyMap as $Old => $New) { $this->AssertFalse(property_exists($Object, $Old)); $this->AssertTrue(property_exists($Object, Object::__get_typecasted_property_name($New))); } return; }
public function __Construct(string $ConfigName = null) { /*// given a configuration name will attempt to load it from disk. else it will generate a fresh config object with default settings. //*/ $Dataset = null; $Options = ['ForceDefaultValues' => true]; if ($ConfigName) { try { $Dataset = $this->Read($ConfigName); } catch (Exception $Error) { throw $Error; } } if ($Dataset) { $Options['ForceDefaultValues'] = false; } //////// parent::__Construct($Dataset, ['Delay' => Nether\Option::Get('Delay'), 'LastIter' => 1, 'LastURL' => '', 'QueryDownload' => '', 'QueryDownloadAttr' => '', 'QueryNext' => '', 'QueryNextAttr' => '', 'SaveDir' => Nether\Option::Get('SaveDir'), 'SaveFile' => '', 'StartURL' => '', 'PadFileNums' => 0, 'TransformDownload' => [], 'TransformNext' => [], 'UserAgent' => Nether\Option::Get('UserAgent'), 'Verbose' => true], $Options); //////// if (is_string($this->TransformDownload)) { $this->TransformDownload = [$this->TransformDownload]; } if (is_string($this->TransformNext)) { $this->TransformNext = [$this->TransformNext]; } return; }