aboutsummaryrefslogtreecommitdiffstats
path: root/apps/dav/tests/unit/Connector/Sabre/BlockLegacyClientPluginTest.php
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2016-07-15 09:52:46 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2016-07-15 09:52:46 +0200
commit2fcb24166f8ac77a49947f14bbeaf0f1bec5dfa4 (patch)
treeb43ce551bf0a4ea1bd78de7084d3814f35beb12f /apps/dav/tests/unit/Connector/Sabre/BlockLegacyClientPluginTest.php
parent813b58ab947222f983fe25d56781f1f43c840538 (diff)
downloadnextcloud-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.php16
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')