<commit_before><?php
error_reporting(E_ALL);

require_once(dirname(__FILE__) . '/../../bootstrap.php');

/**
 * schema service test case.
 */
class SchemaServiceTestValidate extends KalturaApiTestCase
{
	private $serviceUrl = 'http://devtests.kaltura.co.cc';
	
	private static $types = array(
		'bulkUploadXml.bulkUploadXML',
		'dropFolderXmlBulkUpload.dropFolderXml',
		'cuePoint.ingestAPI',
		'cuePoint.serveAPI',
		'syndication',
	);
	
	public function testXsd()
	{
		$serviceUrl = $this->client->getConfig()->serviceUrl;
// 		$serviceUrl = $this->serviceUrl;
		
		foreach(self::$types as $type)
		{
			echo "Testing XSD Type [$type]\n";
			
			$xsdPath = "$serviceUrl/api_v3/service/schema/action/serve/type/$type";
			
			$xsd = new DOMDocument();
			$xsd->load($xsdPath);
			$xsd->schemaValidate('http://www.w3.org/2001/XMLSchema.xsd');
		}
	}
	
	public function testXml()
	{
		foreach(self::$types as $type)
		{
			echo "Testing XML Type [$type]\n";
			
			$path = dirname(__FILE__) . "/testsData/$type";
			$this->assertFileExists($path);
			
			if(!is_dir($path))
				continue;<commit_msg>qnd: Element customData, attribute metadataProfileName is not a valid value of the atomic type xs:int<commit_after><?php
error_reporting(E_ALL);

require_once(dirname(__FILE__) . '/../../bootstrap.php');

/**
 * schema service test case.
 */
class SchemaServiceTestValidate extends KalturaApiTestCase
{
	private $serviceUrl = 'http://devtests.kaltura.co.cc';
	
	private static $types = array(
		'bulkUploadXml.bulkUploadXML',
		'dropFolderXmlBulkUpload.dropFolderXml',
		'cuePoint.ingestAPI',
		'cuePoint.serveAPI',
		'syndication',
	);
	
// 	public function testXsd()
// 	{
// 		$serviceUrl = $this->client->getConfig()->serviceUrl;
// 		$serviceUrl = $this->serviceUrl;
		
// 		foreach(self::$types as $type)
// 		{
// 			echo "Testing XSD Type [$type]\n";
			
// 			$xsdPath = "$serviceUrl/api_v3/service/schema/action/serve/type/$type";
			
// 			$xsd = new DOMDocument();
// 			$xsd->load($xsdPath);
// 			$xsd->schemaValidate('http://www.w3.org/2001/XMLSchema.xsd');
// 		}
// 	}
	
	public function testXml()
	{
		foreach(self::$types as $type)
		{
			echo "Testing XML Type [$type]\n";
			
			$path = dirname(__FILE__) . "/testsData/$type";
			$this->assertFileExists($path);
			
			if(!is_dir($path))
				continue;
{'fraction_non_alphanumeric': 0.17543103448275862, 'fraction_numerical': 0.005172413793103448, 'mean_word_length': 3.6513026052104207, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '1781541', 'n_tokens_mistral': 932, 'n_tokens_neox': 810, 'n_words': 139}