diff options
author | diosmosis <benaka@piwik.pro> | 2015-06-10 03:19:33 +0300 |
---|---|---|
committer | diosmosis <benaka@piwik.pro> | 2015-06-16 05:39:05 +0300 |
commit | 07721914b66634cb39319d6271fb3f15b8c175a8 (patch) | |
tree | 02eeb6d330a5ffc10bb097b38e3a4594f124b040 /core | |
parent | 66ff2875ba6a2ede430b78e6f39f9972b96714c0 (diff) |
Allow using mock CliMulti in CronArchiveTest instead of issuing real requests.
Diffstat (limited to 'core')
-rw-r--r-- | core/CronArchive.php | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/core/CronArchive.php b/core/CronArchive.php index 2c8de1eff1..90388314c8 100644 --- a/core/CronArchive.php +++ b/core/CronArchive.php @@ -773,7 +773,7 @@ class CronArchive $this->requests += count($urls); - $cliMulti = new CliMulti(); + $cliMulti = $this->makeCliMulti(); $cliMulti->setAcceptInvalidSSLCertificate($this->acceptInvalidSSLCertificate); $cliMulti->setConcurrentProcessesLimit($this->getConcurrentRequestsPerWebsite()); $cliMulti->runAsSuperUser(); @@ -856,7 +856,7 @@ class CronArchive } try { - $cliMulti = new CliMulti(); + $cliMulti = $this->makeCliMulti(); $cliMulti->setAcceptInvalidSSLCertificate($this->acceptInvalidSSLCertificate); $cliMulti->runAsSuperUser(); $responses = $cliMulti->request(array($url)); @@ -1528,4 +1528,12 @@ class CronArchive $this->logger->info(" * " . $segmentDefinition); } } + + /** + * @return CliMulti + */ + private function makeCliMulti() + { + return StaticContainer::get('Piwik\CliMulti'); + } } |