Fix PHPUnit warnings
``` 1) OCA\FederatedFileSharing\Tests\Settings\AdminTest::testGetForm with data set #0 (true) PHPUnit_Framework_TestCase::getMock() is deprecated, use PHPUnit_Framework_TestCase::createMock() or PHPUnit_Framework_TestCase::getMockBuilder() instead 2) OCA\FederatedFileSharing\Tests\Settings\AdminTest::testGetForm with data set #1 (false) PHPUnit_Framework_TestCase::getMock() is deprecated, use PHPUnit_Framework_TestCase::createMock() or PHPUnit_Framework_TestCase::getMockBuilder() instead 3) OCA\FederatedFileSharing\Tests\Settings\AdminTest::testGetSection PHPUnit_Framework_TestCase::getMock() is deprecated, use PHPUnit_Framework_TestCase::createMock() or PHPUnit_Framework_TestCase::getMockBuilder() instead 4) OCA\FederatedFileSharing\Tests\Settings\AdminTest::testGetPriority PHPUnit_Framework_TestCase::getMock() is deprecated, use PHPUnit_Framework_TestCase::createMock() or PHPUnit_Framework_TestCase::getMockBuilder() instead ``` Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
This commit is contained in:
parent
231cffffb9
commit
f8b4b2c499
|
@ -23,6 +23,7 @@
|
||||||
|
|
||||||
namespace OCA\FederatedFileSharing\Tests\Settings;
|
namespace OCA\FederatedFileSharing\Tests\Settings;
|
||||||
|
|
||||||
|
use OCA\FederatedFileSharing\FederatedShareProvider;
|
||||||
use OCA\FederatedFileSharing\Settings\Admin;
|
use OCA\FederatedFileSharing\Settings\Admin;
|
||||||
use OCP\AppFramework\Http\TemplateResponse;
|
use OCP\AppFramework\Http\TemplateResponse;
|
||||||
use OCP\GlobalScale\IConfig;
|
use OCP\GlobalScale\IConfig;
|
||||||
|
@ -38,9 +39,8 @@ class AdminTest extends TestCase {
|
||||||
|
|
||||||
public function setUp() {
|
public function setUp() {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
$this->federatedShareProvider = $this->getMockBuilder('\OCA\FederatedFileSharing\FederatedShareProvider')
|
$this->federatedShareProvider = $this->createMock(FederatedShareProvider::class);
|
||||||
->disableOriginalConstructor()->getMock();
|
$this->gsConfig = $this->createMock(IConfig::class);
|
||||||
$this->gsConfig = $this->getMock(IConfig::class);
|
|
||||||
$this->admin = new Admin(
|
$this->admin = new Admin(
|
||||||
$this->federatedShareProvider,
|
$this->federatedShareProvider,
|
||||||
$this->gsConfig
|
$this->gsConfig
|
||||||
|
|
Loading…
Reference in New Issue