<commit_before><?php

/**
 * bulkUpload service base test case.
 */
abstract class BulkUploadServiceBaseTest extends KalturaApiTestCase
{
	/**
	 * Tests bulkUpload->add action
	 * @param int $conversionProfileId Convertion profile id to use for converting the current bulk (-1 to use partner's default)
	 * @param file $csvFileData CSV File
	 * @param KalturaBulkUpload $reference 
	 * @return int
	 * @dataProvider provideData
	 */
	public function testAdd($conversionProfileId, $csvFileData, KalturaBulkUpload $reference)
	{
		$resultObject = $this->client->bulkUpload->add($conversionProfileId, $csvFileData);
		$this->assertType('KalturaBulkUpload', $resultObject);
		$this->assertNotNull($resultObject->id);
		$this->validateAdd($conversionProfileId, $csvFileData, $reference);
		return $resultObject->id;
	}

	/**
	 * Validates testAdd results
	 */
	protected function validateAdd($conversionProfileId, $csvFileData, KalturaBulkUpload $reference)
	{
	}

	/**
	 * Tests bulkUpload->get action
	 * @param KalturaBulkUpload $reference <commit_msg>Auto generated<commit_after><?php

/**
 * bulkUpload service base test case.
 */
abstract class BulkUploadServiceBaseTest extends KalturaApiTestCase
{
	/**
	 * Tests bulkUpload->add action
	 * @param int $conversionProfileId Convertion profile id to use for converting the current bulk (-1 to use partner's default)
	 * @param file $fileData CSV File
	 * @param KalturaBulkUploadType $bulkUploadType 
	 * @param KalturaBulkUpload $reference 
	 * @return int
	 * @dataProvider provideData
	 */
	public function testAdd($conversionProfileId, $fileData, KalturaBulkUploadType $bulkUploadType = null, KalturaBulkUpload $reference)
	{
		$resultObject = $this->client->bulkUpload->add($conversionProfileId, $fileData, $bulkUploadType);
		$this->assertType('KalturaBulkUpload', $resultObject);
		$this->assertNotNull($resultObject->id);
		$this->validateAdd($conversionProfileId, $fileData, $bulkUploadType, $reference);
		return $resultObject->id;
	}

	/**
	 * Validates testAdd results
	 */
	protected function validateAdd($conversionProfileId, $fileData, KalturaBulkUploadType $bulkUploadType = null, KalturaBulkUpload $reference)
	{
	}

	/**
	 * Tests bulkUpload->get action
	 * @param KalturaBulkUpload $reference 
{'fraction_non_alphanumeric': 0.11184792219274978, 'fraction_numerical': 0.0008841732979664014, 'mean_word_length': 5.484240687679083, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '820638', 'n_tokens_mistral': 712, 'n_tokens_neox': 657, 'n_words': 164}