mirror of
https://github.com/nextcloud/passman.git
synced 2025-09-12 16:04:35 +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">
|
<whitelist processUncoveredFilesFromWhitelist="true">
|
||||||
<directory suffix=".php">./lib/Db</directory>
|
<directory suffix=".php">./lib/Db</directory>
|
||||||
<directory suffix=".php">./lib/Utility</directory>
|
<directory suffix=".php">./lib/Utility</directory>
|
||||||
|
<directory suffix=".php">./lib/BackgroundJob</directory>
|
||||||
<directory suffix=".php">./controller</directory>
|
<directory suffix=".php">./controller</directory>
|
||||||
|
|
||||||
<!--<file>/path/to/file</file>-->
|
<!--<file>/path/to/file</file>-->
|
||||||
<!--<exclude>-->
|
<!--<exclude>-->
|
||||||
<!--<directory suffix=".php">/path/to/dir</directory>-->
|
<!--<directory suffix=".php">/path/to/dir</directory>-->
|
||||||
|
|
|
@ -15,7 +15,12 @@ use PHPUnit_Framework_TestCase;
|
||||||
|
|
||||||
use OCP\AppFramework\Http\JSONResponse;
|
use OCP\AppFramework\Http\JSONResponse;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class InternalControllerTest
|
||||||
|
*
|
||||||
|
* @package OCA\Passman\Controller
|
||||||
|
* @coversDefaultClass \OCA\Passman\Controller\InternalController
|
||||||
|
*/
|
||||||
class InternalControllerTest extends PHPUnit_Framework_TestCase {
|
class InternalControllerTest extends PHPUnit_Framework_TestCase {
|
||||||
|
|
||||||
private $controller;
|
private $controller;
|
||||||
|
@ -32,10 +37,17 @@ class InternalControllerTest extends PHPUnit_Framework_TestCase {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @covers ::getAppVersion
|
||||||
|
*/
|
||||||
public function testGetAppVersion() {
|
public function testGetAppVersion() {
|
||||||
$result = $this->controller->generatePerson();
|
$result = $this->controller->generatePerson();
|
||||||
$this->assertTrue($result instanceof JSONResponse);
|
$this->assertTrue($result instanceof JSONResponse);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @covers ::generatePerson
|
||||||
|
*/
|
||||||
public function testGeneratePerson() {
|
public function testGeneratePerson() {
|
||||||
$result = $this->controller->generatePerson();
|
$result = $this->controller->generatePerson();
|
||||||
$this->assertTrue($result instanceof JSONResponse);
|
$this->assertTrue($result instanceof JSONResponse);
|
||||||
|
|
|
@ -15,7 +15,12 @@ use PHPUnit_Framework_TestCase;
|
||||||
|
|
||||||
use OCP\AppFramework\Http\TemplateResponse;
|
use OCP\AppFramework\Http\TemplateResponse;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class PageControllerTest
|
||||||
|
*
|
||||||
|
* @package OCA\Passman\Controller
|
||||||
|
* @coversDefaultClass \OCA\Passman\Controller\PageController
|
||||||
|
*/
|
||||||
class PageControllerTest extends PHPUnit_Framework_TestCase {
|
class PageControllerTest extends PHPUnit_Framework_TestCase {
|
||||||
|
|
||||||
private $controller;
|
private $controller;
|
||||||
|
@ -29,6 +34,9 @@ class PageControllerTest extends PHPUnit_Framework_TestCase {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @covers ::index
|
||||||
|
*/
|
||||||
public function testIndex() {
|
public function testIndex() {
|
||||||
$result = $this->controller->index();
|
$result = $this->controller->index();
|
||||||
$this->assertEquals(['user' => 'john'], $result->getParams());
|
$this->assertEquals(['user' => 'john'], $result->getParams());
|
||||||
|
@ -36,6 +44,9 @@ class PageControllerTest extends PHPUnit_Framework_TestCase {
|
||||||
$this->assertTrue($result instanceof TemplateResponse);
|
$this->assertTrue($result instanceof TemplateResponse);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @covers ::bookmarklet
|
||||||
|
*/
|
||||||
public function testBookmarklet() {
|
public function testBookmarklet() {
|
||||||
$result = $this->controller->bookmarklet('http://google.com', 'Google');
|
$result = $this->controller->bookmarklet('http://google.com', 'Google');
|
||||||
$this->assertEquals(['url' => 'http://google.com', 'title' => 'Google'], $result->getParams());
|
$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);
|
$this->assertTrue($result instanceof TemplateResponse);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @covers ::publicSharePage
|
||||||
|
*/
|
||||||
public function testPublicSharePage() {
|
public function testPublicSharePage() {
|
||||||
$result = $this->controller->publicSharePage();
|
$result = $this->controller->publicSharePage();
|
||||||
$this->assertEquals('public_share', $result->getTemplateName());
|
$this->assertEquals('public_share', $result->getTemplateName());
|
||||||
|
|
|
@ -31,7 +31,7 @@ use OCP\IConfig;
|
||||||
*
|
*
|
||||||
* @group DB
|
* @group DB
|
||||||
* @package OCA\Passman\Tests\BackgroundJob
|
* @package OCA\Passman\Tests\BackgroundJob
|
||||||
* @covers ExpireCredentials
|
* @covers \OCA\Passman\BackgroundJob\ExpireCredentials
|
||||||
*/
|
*/
|
||||||
class ExpireCredentialsTest extends PHPUnit_Framework_TestCase {
|
class ExpireCredentialsTest extends PHPUnit_Framework_TestCase {
|
||||||
public function testRun() {
|
public function testRun() {
|
Loading…
Add table
Reference in a new issue