/** * testUploadArray * * @return void */ public function testUploadArray() { $expected = ['name' => 'titus.jpg', 'tmp_name' => $this->fileFixtures . 'titus.jpg', 'error' => 0, 'type' => 'image/jpeg', 'size' => 332643]; $result = StorageUtils::uploadArray($this->fileFixtures . 'titus.jpg'); $this->assertEquals($result, $expected); }
/** * Returns an array that matches the structure of a regular upload for a local file * * @param $file * @param string File with path * @return array Array that matches the structure of a regular upload */ public static function uploadArray($file, $filename = null) { return StorageUtils::uploadArray($file, $filename); }