public function testFill() { $attributes = ['file' => $this->fileMock]; $property = new \ReflectionProperty($this->testInstance, 'attributes'); $property->setAccessible(true); $property->setValue($this->testInstance, ['file']); $property->setAccessible(false); $this->testInstance->fill($attributes); }
public function testFill() { $fakeData = $this->generateFakeData(); $reflectionProperty = new \ReflectionProperty($this->testInstance, 'attributes'); $reflectionProperty->setAccessible(true); $reflectionProperty->setValue($this->testInstance, array_keys($fakeData)); $reflectionProperty->setAccessible(false); foreach ($fakeData as $key => $value) { $this->testInstance->{$key} = null; } $this->testInstance->fill($fakeData); }