diff options
author | Marcos Zuriaga <wolfi@wolfi.es> | 2016-10-16 21:35:14 +0300 |
---|---|---|
committer | Marcos Zuriaga <wolfi@wolfi.es> | 2016-10-16 21:35:14 +0300 |
commit | 02ef0187efd8fe7d37e0a49f33cd1a98c72cd43d (patch) | |
tree | d57fe3ae446d8a32e4895ade5bedfdea2fca4b71 /tests | |
parent | 0fefb19a8e6cbbf361996981458571678169e461 (diff) |
Added missing classes to coverage
Added missing @covers annotations
Diffstat (limited to 'tests')
-rw-r--r-- | tests/unit/controller/InternalControllerTest.php | 14 | ||||
-rw-r--r-- | tests/unit/controller/PageControllerTest.php | 16 | ||||
-rw-r--r-- | tests/unit/lib/BackgroundJob/ExpireCredentialsTest.php (renamed from tests/unit/BackgroundJob/ExpireCredentialsTest.php) | 2 |
3 files changed, 29 insertions, 3 deletions
diff --git a/tests/unit/controller/InternalControllerTest.php b/tests/unit/controller/InternalControllerTest.php index 56a99dad..ba8ee051 100644 --- a/tests/unit/controller/InternalControllerTest.php +++ b/tests/unit/controller/InternalControllerTest.php @@ -15,7 +15,12 @@ use PHPUnit_Framework_TestCase; use OCP\AppFramework\Http\JSONResponse; - +/** + * Class InternalControllerTest + * + * @package OCA\Passman\Controller + * @coversDefaultClass \OCA\Passman\Controller\InternalController + */ class InternalControllerTest extends PHPUnit_Framework_TestCase { private $controller; @@ -32,10 +37,17 @@ class InternalControllerTest extends PHPUnit_Framework_TestCase { ); } + /** + * @covers ::getAppVersion + */ public function testGetAppVersion() { $result = $this->controller->generatePerson(); $this->assertTrue($result instanceof JSONResponse); } + + /** + * @covers ::generatePerson + */ public function testGeneratePerson() { $result = $this->controller->generatePerson(); $this->assertTrue($result instanceof JSONResponse); diff --git a/tests/unit/controller/PageControllerTest.php b/tests/unit/controller/PageControllerTest.php index 71c03a82..02dad800 100644 --- a/tests/unit/controller/PageControllerTest.php +++ b/tests/unit/controller/PageControllerTest.php @@ -15,7 +15,12 @@ use PHPUnit_Framework_TestCase; use OCP\AppFramework\Http\TemplateResponse; - +/** + * Class PageControllerTest + * + * @package OCA\Passman\Controller + * @coversDefaultClass \OCA\Passman\Controller\PageController + */ class PageControllerTest extends PHPUnit_Framework_TestCase { private $controller; @@ -29,6 +34,9 @@ class PageControllerTest extends PHPUnit_Framework_TestCase { ); } + /** + * @covers ::index + */ public function testIndex() { $result = $this->controller->index(); $this->assertEquals(['user' => 'john'], $result->getParams()); @@ -36,6 +44,9 @@ class PageControllerTest extends PHPUnit_Framework_TestCase { $this->assertTrue($result instanceof TemplateResponse); } + /** + * @covers ::bookmarklet + */ public function testBookmarklet() { $result = $this->controller->bookmarklet('http://google.com', 'Google'); $this->assertEquals(['url' => 'http://google.com', 'title' => 'Google'], $result->getParams()); @@ -43,6 +54,9 @@ class PageControllerTest extends PHPUnit_Framework_TestCase { $this->assertTrue($result instanceof TemplateResponse); } + /** + * @covers ::publicSharePage + */ public function testPublicSharePage() { $result = $this->controller->publicSharePage(); $this->assertEquals('public_share', $result->getTemplateName()); diff --git a/tests/unit/BackgroundJob/ExpireCredentialsTest.php b/tests/unit/lib/BackgroundJob/ExpireCredentialsTest.php index 2d0af91d..05998623 100644 --- a/tests/unit/BackgroundJob/ExpireCredentialsTest.php +++ b/tests/unit/lib/BackgroundJob/ExpireCredentialsTest.php @@ -31,7 +31,7 @@ use OCP\IConfig; * * @group DB * @package OCA\Passman\Tests\BackgroundJob - * @covers ExpireCredentials + * @covers \OCA\Passman\BackgroundJob\ExpireCredentials */ class ExpireCredentialsTest extends PHPUnit_Framework_TestCase { public function testRun() { |