diff options
Diffstat (limited to 'apps/comments/tests')
-rw-r--r-- | apps/comments/tests/Unit/JSSettingsHelperTest.php | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/apps/comments/tests/Unit/JSSettingsHelperTest.php b/apps/comments/tests/Unit/JSSettingsHelperTest.php index 26cdee1f26b..94d13a77d94 100644 --- a/apps/comments/tests/Unit/JSSettingsHelperTest.php +++ b/apps/comments/tests/Unit/JSSettingsHelperTest.php @@ -1,4 +1,7 @@ <?php + +declare(strict_types=1); + /** * @copyright Copyright (c) 2017 Arthur Schiwon <blizzz@arthur-schiwon.de> * @@ -26,11 +29,11 @@ namespace OCA\Comments\Tests\Unit; use OCA\Comments\JSSettingsHelper; use OCP\IConfig; -use OCP\IServerContainer; +use PHPUnit\Framework\MockObject\MockObject; use Test\TestCase; class JSSettingsHelperTest extends TestCase { - /** @var IServerContainer|\PHPUnit_Framework_MockObject_MockObject */ + /** @var IConfig|MockObject */ protected $c; /** @var JSSettingsHelper */ protected $helper; @@ -38,22 +41,17 @@ class JSSettingsHelperTest extends TestCase { protected function setUp(): void { parent::setUp(); - $this->c = $this->createMock(IServerContainer::class); + $this->c = $this->createMock(IConfig::class); $this->helper = new JSSettingsHelper($this->c); } public function testExtend() { - $config = $this->createMock(IConfig::class); - $config->expects($this->once()) + $this->c->expects($this->once()) ->method('getAppValue') ->with('comments', 'maxAutoCompleteResults') ->willReturn(13); - $this->c->expects($this->once()) - ->method('getConfig') - ->willReturn($config); - $config = [ 'oc_appconfig' => json_encode([ 'anotherapp' => [ |