From 220725595584d774a95630a55dfbb29b56c8a145 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20Ga=C5=BAdzik?= <m.gazdzik@clearcode.cc>
Date: Fri, 21 Nov 2014 10:28:09 +0100
Subject: [PATCH] modified test case to allow overriding requests Collection
 and it's logic

---
 tests/PHPUnit/Framework/TestCase/SystemTestCase.php | 7 ++++++-
 tests/PHPUnit/Framework/TestRequest/Collection.php  | 2 +-
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/tests/PHPUnit/Framework/TestCase/SystemTestCase.php b/tests/PHPUnit/Framework/TestCase/SystemTestCase.php
index 96b60cab0a..879fc915e2 100755
--- a/tests/PHPUnit/Framework/TestCase/SystemTestCase.php
+++ b/tests/PHPUnit/Framework/TestCase/SystemTestCase.php
@@ -432,7 +432,7 @@ abstract class SystemTestCase extends PHPUnit_Framework_TestCase
             $this->changeLanguage($testConfig->language);
         }
 
-        $testRequests = new Collection($api, $testConfig, $api);
+        $testRequests = $this->getTestRequestsCollection($api, $testConfig, $api);
 
         foreach ($testRequests->getRequestUrls() as $apiId => $requestUrl) {
             $this->_testApiUrl($testName . $testConfig->testSuffix, $apiId, $requestUrl, $testConfig->compareAgainst, $testConfig->xmlFieldsToRemove, $params);
@@ -460,6 +460,11 @@ abstract class SystemTestCase extends PHPUnit_Framework_TestCase
         return count($this->comparisonFailures) == 0;
     }
 
+    protected function getTestRequestsCollection($api, $testConfig, $api)
+    {
+       return new Collection($api, $testConfig, $api);
+    }
+
     private function printComparisonFailures()
     {
         $messages = '';
diff --git a/tests/PHPUnit/Framework/TestRequest/Collection.php b/tests/PHPUnit/Framework/TestRequest/Collection.php
index 0e9c565d80..e05ef7d5cd 100644
--- a/tests/PHPUnit/Framework/TestRequest/Collection.php
+++ b/tests/PHPUnit/Framework/TestRequest/Collection.php
@@ -288,7 +288,7 @@ class Collection
         return $result;
     }
 
-    private function shouldSkipApiMethod($moduleName, $methodName) {
+    protected function shouldSkipApiMethod($moduleName, $methodName) {
         $apiId = $moduleName . '.' . $methodName;
 
         // If Api to test were set, we only test these
-- 
GitLab