mirror of
https://github.com/nextcloud/passman.git
synced 2025-09-11 23:44:20 +08:00
Added missing classes to coverage
Added missing @covers annotations
This commit is contained in:
parent
0fefb19a8e
commit
02ef0187ef
4 changed files with 31 additions and 3 deletions
|
@ -8,7 +8,9 @@
|
|||
<whitelist processUncoveredFilesFromWhitelist="true">
|
||||
<directory suffix=".php">./lib/Db</directory>
|
||||
<directory suffix=".php">./lib/Utility</directory>
|
||||
<directory suffix=".php">./lib/BackgroundJob</directory>
|
||||
<directory suffix=".php">./controller</directory>
|
||||
|
||||
<!--<file>/path/to/file</file>-->
|
||||
<!--<exclude>-->
|
||||
<!--<directory suffix=".php">/path/to/dir</directory>-->
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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() {
|
Loading…
Add table
Reference in a new issue