/** * * Tests the media upload action (returns the new token for that file) * */ public function testUploadAction() { $testCaseInputs = parent::provider(dirname(__FILE__) . "/testsData/testMediaServiceUploadAction.data"); $dataForSecondTest = array(); foreach ($testCaseInputs as $testCaseInput) { foreach ($testCaseInput as $inputData) { $filePath = $inputData->additionalData["value"]; $partnerId = $inputData->additionalData["partnerId"]; $secret = $inputData->additionalData["secret"]; $client = parent::getClient($partnerId, $secret, 'www.kaltura.com'); $tokenId = $client->media->upload(realpath($filePath)); //Add the new token for this file upload $dataForSecondTest[] = array("tokenId" => $tokenId, "client" => $client); } } return $dataForSecondTest; }