diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2016-04-19 12:19:39 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2016-04-22 08:38:41 +0200 |
commit | d0030aad6cb108bbf4ca729d0e11f3438145aba9 (patch) | |
tree | b67c516648a5aaced4598e889c93f85db3adb957 /tests | |
parent | ded84bf571dd51798904823405f673e16ca5eff4 (diff) | |
download | nextcloud-server-d0030aad6cb108bbf4ca729d0e11f3438145aba9.tar.gz nextcloud-server-d0030aad6cb108bbf4ca729d0e11f3438145aba9.zip |
Remove deprecated HTTPHelper from InfoParser
Diffstat (limited to 'tests')
-rw-r--r-- | tests/data/app/expected-info.json | 4 | ||||
-rw-r--r-- | tests/lib/app/codechecker/infocheckertest.php | 2 | ||||
-rw-r--r-- | tests/lib/app/infoparser.php | 16 |
3 files changed, 9 insertions, 13 deletions
diff --git a/tests/data/app/expected-info.json b/tests/data/app/expected-info.json index d86ffed482b..e05d02f7641 100644 --- a/tests/data/app/expected-info.json +++ b/tests/data/app/expected-info.json @@ -67,5 +67,9 @@ "max-version": "8" } } + }, + "repair-steps": { + "pre-migration": [], + "post-migration": [] } } 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); } /** |