private function tryToProcessQueryTestCase($jsonTestCaseFileHandler) { // Set query parser late to ensure that expected settings are adjusted // (language etc.) because the __construct relies on the context language $this->queryTestCaseProcessor->setQueryParser(ApplicationFactory::getInstance()->newQueryParser()); $this->queryTestCaseProcessor->setDebugMode($jsonTestCaseFileHandler->getDebugMode()); foreach ($jsonTestCaseFileHandler->findTestCasesFor('query-testcases') as $queryCase) { $this->queryTestCaseProcessor->processQueryCase(new QueryTestCaseInterpreter($queryCase)); } foreach ($jsonTestCaseFileHandler->findTestCasesFor('concept-testcases') as $conceptCase) { $this->queryTestCaseProcessor->processConceptCase(new QueryTestCaseInterpreter($conceptCase)); } foreach ($jsonTestCaseFileHandler->findTestCasesFor('format-testcases') as $formatCase) { $this->queryTestCaseProcessor->processFormatCase(new QueryTestCaseInterpreter($formatCase)); } }
private function doRunQueryTests($jsonTestCaseFileHandler) { // Set query parser late to ensure that expected settings are adjusted // (language etc.) because the __construct relies on the context language $this->queryTestCaseProcessor->setQueryParser(ApplicationFactory::getInstance()->getQueryFactory()->newQueryParser()); $this->queryTestCaseProcessor->setDebugMode($jsonTestCaseFileHandler->getDebugMode()); foreach ($jsonTestCaseFileHandler->findTestCasesByType('query') as $case) { if ($jsonTestCaseFileHandler->requiredToSkipFor($case, $this->connectorId)) { continue; } $this->queryTestCaseProcessor->processQueryCase(new QueryTestCaseInterpreter($case)); } foreach ($jsonTestCaseFileHandler->findTestCasesByType('concept') as $conceptCase) { $this->queryTestCaseProcessor->processConceptCase(new QueryTestCaseInterpreter($conceptCase)); } foreach ($jsonTestCaseFileHandler->findTestCasesByType('format') as $formatCase) { $this->queryTestCaseProcessor->processFormatCase(new QueryTestCaseInterpreter($formatCase)); } }