remove unusable @covers annotations

This commit is contained in:
Benoît Burnichon
2016-04-15 17:37:23 +02:00
parent fef27d31bd
commit e46ce07fbb
3 changed files with 7 additions and 37 deletions

View File

@@ -903,11 +903,14 @@ class ApiJsonTest extends ApiTestCase
->method('getSuggestions')
->will($this->returnValue(new ArrayCollection()));
self::$DI['app']['phraseanet.SE'] = $this->getMock('Alchemy\Phrasea\SearchEngine\SearchEngineInterface');
$app = $this->getApplication();
$mock = $this->getMock('Alchemy\Phrasea\SearchEngine\SearchEngineInterface');
$app['phraseanet.SE'] = $mock;
self::$DI['app']['phraseanet.SE']->expects($this->once())
$mock
->expects($this->once())
->method('query')
->with('koala', 0, 10)
->withAnyParameters()
->will($this->returnValue(
$this->getMockBuilder('Alchemy\Phrasea\SearchEngine\SearchEngineResult')
->disableOriginalConstructor()

View File

@@ -13,10 +13,6 @@ use Prophecy\Argument;
*/
class QueryTest extends \PhraseanetAuthenticatedWebTestCase
{
/**
* @covers Alchemy\Phrasea\Controller\Prod\Query::query
*/
public function testQuery()
{
$route = '/prod/query/';
@@ -46,9 +42,6 @@ class QueryTest extends \PhraseanetAuthenticatedWebTestCase
$this->assertInternalType('array', $data);
}
/**
* @covers Alchemy\Phrasea\Controller\Prod\Query::queryAnswerTrain
*/
public function testQueryAnswerTrain()
{
$app = $this->mockElasticsearchResult(self::$DI['record_2']);
@@ -58,13 +51,11 @@ class QueryTest extends \PhraseanetAuthenticatedWebTestCase
$options->onCollections($app->getAclForUser($app->getAuthenticatedUser())->get_granted_base());
$serializedOptions = $options->serialize();
$client = $this->getClient();
$client->request('POST', '/prod/query/answer-train/', [
$response = $this->request('POST', '/prod/query/answer-train/', [
'options_serial' => $serializedOptions,
'pos' => 0,
'query' => ''
]);
$response = $client->getResponse();
$this->assertTrue($response->isOk());
$datas = (array) json_decode($response->getContent());
$this->assertArrayHasKey('current', $datas);

View File

@@ -18,9 +18,6 @@ class RecordsTest extends \PhraseanetAuthenticatedWebTestCase
{
protected $client;
/**
* @covers Alchemy\Phrasea\Controller\Prod\Records::whatCanIDelete
*/
public function testWhatCanIDelete()
{
self::$DI['client']->request('POST', '/prod/records/delete/what/', ['lst' => self::$DI['record_1']->get_serialize_key()]);
@@ -29,9 +26,6 @@ class RecordsTest extends \PhraseanetAuthenticatedWebTestCase
unset($response);
}
/**
* @covers Alchemy\Phrasea\Controller\Prod\Records::doDeleteRecords
*/
public function testDoDeleteRecords()
{
$file = new File(self::$DI['app'], self::$DI['app']['mediavorus']->guess(__DIR__ . '/../../../../../files/cestlafete.jpg'), self::$DI['collection']);
@@ -47,9 +41,6 @@ class RecordsTest extends \PhraseanetAuthenticatedWebTestCase
}
}
/**
* @covers Alchemy\Phrasea\Controller\Prod\Records::renewUrl
*/
public function testRenewUrl()
{
$file = new File(self::$DI['app'], self::$DI['app']['mediavorus']->guess(__DIR__ . '/../../../../../files/cestlafete.jpg'), self::$DI['collection']);
@@ -60,9 +51,6 @@ class RecordsTest extends \PhraseanetAuthenticatedWebTestCase
$record->delete();
}
/**
* @covers Alchemy\Phrasea\Controller\Prod\Records::getRecord
*/
public function testGetRecordDetailNotAjax()
{
self::$DI['client']->request('POST', '/prod/records/');
@@ -108,9 +96,6 @@ class RecordsTest extends \PhraseanetAuthenticatedWebTestCase
$this->assertArrayHasKey('title', $data);
}
/**
* @covers Alchemy\Phrasea\Controller\Prod\Records::getRecord
*/
public function testGetRecordDetailResult()
{
$app = $this->mockElasticsearchResult(self::$DI['record_1']);
@@ -141,9 +126,6 @@ class RecordsTest extends \PhraseanetAuthenticatedWebTestCase
$this->assertArrayHasKey('title', $data);
}
/**
* @covers Alchemy\Phrasea\Controller\Prod\Records::getRecord
*/
public function testGetRecordDetailREG()
{
$this->authenticate(self::$DI['app']);
@@ -168,9 +150,6 @@ class RecordsTest extends \PhraseanetAuthenticatedWebTestCase
$this->assertObjectHasAttribute('title', $data);
}
/**
* @covers Alchemy\Phrasea\Controller\Prod\Records::getRecord
*/
public function testGetRecordDetailBasket()
{
$this->authenticate(self::$DI['app']);
@@ -198,9 +177,6 @@ class RecordsTest extends \PhraseanetAuthenticatedWebTestCase
unset($response, $data);
}
/**
* @covers Alchemy\Phrasea\Controller\Prod\Records::getRecord
*/
public function testGetRecordDetailFeed()
{
$this->authenticate(self::$DI['app']);