aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/app
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/app')
-rw-r--r--tests/lib/app/codechecker/infocheckertest.php2
-rw-r--r--tests/lib/app/infoparser.php16
2 files changed, 5 insertions, 13 deletions
diff --git a/tests/lib/app/codechecker/infocheckertest.php b/tests/lib/app/codechecker/infocheckertest.php
index b31c5fe3a7a..c6df5a715a1 100644
--- a/tests/lib/app/codechecker/infocheckertest.php
+++ b/tests/lib/app/codechecker/infocheckertest.php
@@ -43,7 +43,7 @@ class InfoCheckerTest extends TestCase {
protected function setUp() {
parent::setUp();
- $infoParser = new InfoParser(\OC::$server->getHTTPHelper(), \OC::$server->getURLGenerator());
+ $infoParser = new InfoParser(\OC::$server->getURLGenerator());
$this->infoChecker = new InfoChecker($infoParser);
}
diff --git a/tests/lib/app/infoparser.php b/tests/lib/app/infoparser.php
index 1e5257abec3..cb89dd0131c 100644
--- a/tests/lib/app/infoparser.php
+++ b/tests/lib/app/infoparser.php
@@ -10,35 +10,27 @@
namespace Test\App;
use OC;
+use OCP\IURLGenerator;
use Test\TestCase;
class InfoParser extends TestCase {
- /**
- * @var \OC\App\InfoParser
- */
+ /** @var \OC\App\InfoParser */
private $parser;
public function setUp() {
- $config = $this->getMockBuilder('\OCP\IConfig')
- ->disableOriginalConstructor()->getMock();
- $clientService = $this->getMock('\OCP\Http\Client\IClientService');
- $httpHelper = $this->getMockBuilder('\OC\HTTPHelper')
- ->setConstructorArgs([$config, $clientService])
- ->setMethods(['getHeaders'])
- ->getMock();
$urlGenerator = $this->getMockBuilder('\OCP\IURLGenerator')
->disableOriginalConstructor()
->getMock();
- //linkToDocs
+ /** @var IURLGenerator | \PHPUnit_Framework_MockObject_MockObject $urlGenerator */
$urlGenerator->expects($this->any())
->method('linkToDocs')
->will($this->returnCallback(function ($url) {
return "https://docs.example.com/server/go.php?to=$url";
}));
- $this->parser = new \OC\App\InfoParser($httpHelper, $urlGenerator);
+ $this->parser = new \OC\App\InfoParser($urlGenerator);
}
/**