Added missing classes to coverage

Added missing @covers annotations
This commit is contained in:
Marcos Zuriaga 2016-10-16 20:35:14 +02:00
parent 0fefb19a8e
commit 02ef0187ef
No known key found for this signature in database
GPG key ID: 7D15585354D072FF
4 changed files with 31 additions and 3 deletions

View file

@ -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>-->

View file

@ -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);

View file

@ -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());

View file

@ -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() {