mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-24 10:23:17 +00:00
remove unusable @covers annotations
This commit is contained in:
@@ -903,11 +903,14 @@ class ApiJsonTest extends ApiTestCase
|
|||||||
->method('getSuggestions')
|
->method('getSuggestions')
|
||||||
->will($this->returnValue(new ArrayCollection()));
|
->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')
|
->method('query')
|
||||||
->with('koala', 0, 10)
|
->withAnyParameters()
|
||||||
->will($this->returnValue(
|
->will($this->returnValue(
|
||||||
$this->getMockBuilder('Alchemy\Phrasea\SearchEngine\SearchEngineResult')
|
$this->getMockBuilder('Alchemy\Phrasea\SearchEngine\SearchEngineResult')
|
||||||
->disableOriginalConstructor()
|
->disableOriginalConstructor()
|
||||||
|
|||||||
@@ -13,10 +13,6 @@ use Prophecy\Argument;
|
|||||||
*/
|
*/
|
||||||
class QueryTest extends \PhraseanetAuthenticatedWebTestCase
|
class QueryTest extends \PhraseanetAuthenticatedWebTestCase
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
|
||||||
* @covers Alchemy\Phrasea\Controller\Prod\Query::query
|
|
||||||
*/
|
|
||||||
public function testQuery()
|
public function testQuery()
|
||||||
{
|
{
|
||||||
$route = '/prod/query/';
|
$route = '/prod/query/';
|
||||||
@@ -46,9 +42,6 @@ class QueryTest extends \PhraseanetAuthenticatedWebTestCase
|
|||||||
$this->assertInternalType('array', $data);
|
$this->assertInternalType('array', $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @covers Alchemy\Phrasea\Controller\Prod\Query::queryAnswerTrain
|
|
||||||
*/
|
|
||||||
public function testQueryAnswerTrain()
|
public function testQueryAnswerTrain()
|
||||||
{
|
{
|
||||||
$app = $this->mockElasticsearchResult(self::$DI['record_2']);
|
$app = $this->mockElasticsearchResult(self::$DI['record_2']);
|
||||||
@@ -58,13 +51,11 @@ class QueryTest extends \PhraseanetAuthenticatedWebTestCase
|
|||||||
$options->onCollections($app->getAclForUser($app->getAuthenticatedUser())->get_granted_base());
|
$options->onCollections($app->getAclForUser($app->getAuthenticatedUser())->get_granted_base());
|
||||||
$serializedOptions = $options->serialize();
|
$serializedOptions = $options->serialize();
|
||||||
|
|
||||||
$client = $this->getClient();
|
$response = $this->request('POST', '/prod/query/answer-train/', [
|
||||||
$client->request('POST', '/prod/query/answer-train/', [
|
|
||||||
'options_serial' => $serializedOptions,
|
'options_serial' => $serializedOptions,
|
||||||
'pos' => 0,
|
'pos' => 0,
|
||||||
'query' => ''
|
'query' => ''
|
||||||
]);
|
]);
|
||||||
$response = $client->getResponse();
|
|
||||||
$this->assertTrue($response->isOk());
|
$this->assertTrue($response->isOk());
|
||||||
$datas = (array) json_decode($response->getContent());
|
$datas = (array) json_decode($response->getContent());
|
||||||
$this->assertArrayHasKey('current', $datas);
|
$this->assertArrayHasKey('current', $datas);
|
||||||
|
|||||||
@@ -18,9 +18,6 @@ class RecordsTest extends \PhraseanetAuthenticatedWebTestCase
|
|||||||
{
|
{
|
||||||
protected $client;
|
protected $client;
|
||||||
|
|
||||||
/**
|
|
||||||
* @covers Alchemy\Phrasea\Controller\Prod\Records::whatCanIDelete
|
|
||||||
*/
|
|
||||||
public function testWhatCanIDelete()
|
public function testWhatCanIDelete()
|
||||||
{
|
{
|
||||||
self::$DI['client']->request('POST', '/prod/records/delete/what/', ['lst' => self::$DI['record_1']->get_serialize_key()]);
|
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);
|
unset($response);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @covers Alchemy\Phrasea\Controller\Prod\Records::doDeleteRecords
|
|
||||||
*/
|
|
||||||
public function testDoDeleteRecords()
|
public function testDoDeleteRecords()
|
||||||
{
|
{
|
||||||
$file = new File(self::$DI['app'], self::$DI['app']['mediavorus']->guess(__DIR__ . '/../../../../../files/cestlafete.jpg'), self::$DI['collection']);
|
$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()
|
public function testRenewUrl()
|
||||||
{
|
{
|
||||||
$file = new File(self::$DI['app'], self::$DI['app']['mediavorus']->guess(__DIR__ . '/../../../../../files/cestlafete.jpg'), self::$DI['collection']);
|
$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();
|
$record->delete();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @covers Alchemy\Phrasea\Controller\Prod\Records::getRecord
|
|
||||||
*/
|
|
||||||
public function testGetRecordDetailNotAjax()
|
public function testGetRecordDetailNotAjax()
|
||||||
{
|
{
|
||||||
self::$DI['client']->request('POST', '/prod/records/');
|
self::$DI['client']->request('POST', '/prod/records/');
|
||||||
@@ -108,9 +96,6 @@ class RecordsTest extends \PhraseanetAuthenticatedWebTestCase
|
|||||||
$this->assertArrayHasKey('title', $data);
|
$this->assertArrayHasKey('title', $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @covers Alchemy\Phrasea\Controller\Prod\Records::getRecord
|
|
||||||
*/
|
|
||||||
public function testGetRecordDetailResult()
|
public function testGetRecordDetailResult()
|
||||||
{
|
{
|
||||||
$app = $this->mockElasticsearchResult(self::$DI['record_1']);
|
$app = $this->mockElasticsearchResult(self::$DI['record_1']);
|
||||||
@@ -141,9 +126,6 @@ class RecordsTest extends \PhraseanetAuthenticatedWebTestCase
|
|||||||
$this->assertArrayHasKey('title', $data);
|
$this->assertArrayHasKey('title', $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @covers Alchemy\Phrasea\Controller\Prod\Records::getRecord
|
|
||||||
*/
|
|
||||||
public function testGetRecordDetailREG()
|
public function testGetRecordDetailREG()
|
||||||
{
|
{
|
||||||
$this->authenticate(self::$DI['app']);
|
$this->authenticate(self::$DI['app']);
|
||||||
@@ -168,9 +150,6 @@ class RecordsTest extends \PhraseanetAuthenticatedWebTestCase
|
|||||||
$this->assertObjectHasAttribute('title', $data);
|
$this->assertObjectHasAttribute('title', $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @covers Alchemy\Phrasea\Controller\Prod\Records::getRecord
|
|
||||||
*/
|
|
||||||
public function testGetRecordDetailBasket()
|
public function testGetRecordDetailBasket()
|
||||||
{
|
{
|
||||||
$this->authenticate(self::$DI['app']);
|
$this->authenticate(self::$DI['app']);
|
||||||
@@ -198,9 +177,6 @@ class RecordsTest extends \PhraseanetAuthenticatedWebTestCase
|
|||||||
unset($response, $data);
|
unset($response, $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @covers Alchemy\Phrasea\Controller\Prod\Records::getRecord
|
|
||||||
*/
|
|
||||||
public function testGetRecordDetailFeed()
|
public function testGetRecordDetailFeed()
|
||||||
{
|
{
|
||||||
$this->authenticate(self::$DI['app']);
|
$this->authenticate(self::$DI['app']);
|
||||||
|
|||||||
Reference in New Issue
Block a user