diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2016-07-15 09:52:46 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2016-07-15 09:52:46 +0200 |
commit | 2fcb24166f8ac77a49947f14bbeaf0f1bec5dfa4 (patch) | |
tree | b43ce551bf0a4ea1bd78de7084d3814f35beb12f /apps/dav/tests/unit/Connector/Sabre/BlockLegacyClientPluginTest.php | |
parent | 813b58ab947222f983fe25d56781f1f43c840538 (diff) | |
download | nextcloud-server-2fcb24166f8ac77a49947f14bbeaf0f1bec5dfa4.tar.gz nextcloud-server-2fcb24166f8ac77a49947f14bbeaf0f1bec5dfa4.zip |
Fix PHPUnit 5.4 warnings in DAV app
* getMock is deprecated
Diffstat (limited to 'apps/dav/tests/unit/Connector/Sabre/BlockLegacyClientPluginTest.php')
-rw-r--r-- | apps/dav/tests/unit/Connector/Sabre/BlockLegacyClientPluginTest.php | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/apps/dav/tests/unit/Connector/Sabre/BlockLegacyClientPluginTest.php b/apps/dav/tests/unit/Connector/Sabre/BlockLegacyClientPluginTest.php index 3859e4f2790..890d11465a4 100644 --- a/apps/dav/tests/unit/Connector/Sabre/BlockLegacyClientPluginTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/BlockLegacyClientPluginTest.php @@ -41,7 +41,9 @@ class BlockLegacyClientPluginTest extends TestCase { public function setUp() { parent::setUp(); - $this->config = $this->getMock('\OCP\IConfig'); + $this->config = $this->getMockBuilder('\OCP\IConfig') + ->disableOriginalConstructor() + ->getMock(); $this->blockLegacyClientVersionPlugin = new BlockLegacyClientPlugin($this->config); } @@ -66,7 +68,9 @@ class BlockLegacyClientPluginTest extends TestCase { */ public function testBeforeHandlerException($userAgent) { /** @var \Sabre\HTTP\RequestInterface $request */ - $request = $this->getMock('\Sabre\HTTP\RequestInterface'); + $request = $this->getMockBuilder('\Sabre\HTTP\RequestInterface') + ->disableOriginalConstructor() + ->getMock(); $request ->expects($this->once()) ->method('getHeader') @@ -101,7 +105,9 @@ class BlockLegacyClientPluginTest extends TestCase { */ public function testBeforeHandlerSuccess($userAgent) { /** @var \Sabre\HTTP\RequestInterface $request */ - $request = $this->getMock('\Sabre\HTTP\RequestInterface'); + $request = $this->getMockBuilder('\Sabre\HTTP\RequestInterface') + ->disableOriginalConstructor() + ->getMock(); $request ->expects($this->once()) ->method('getHeader') @@ -119,7 +125,9 @@ class BlockLegacyClientPluginTest extends TestCase { public function testBeforeHandlerNoUserAgent() { /** @var \Sabre\HTTP\RequestInterface $request */ - $request = $this->getMock('\Sabre\HTTP\RequestInterface'); + $request = $this->getMockBuilder('\Sabre\HTTP\RequestInterface') + ->disableOriginalConstructor() + ->getMock(); $request ->expects($this->once()) ->method('getHeader') |