mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 23:23:51 +00:00
fix tests for chill main
This commit is contained in:
@@ -32,21 +32,7 @@ use Chill\MainBundle\Search\SearchInterface;
|
||||
*/
|
||||
class SearchControllerTest extends WebTestCase
|
||||
{
|
||||
/*
|
||||
public function setUp()
|
||||
{
|
||||
static::bootKernel();
|
||||
|
||||
//add a default service
|
||||
$this->addSearchService(
|
||||
$this->createDefaultSearchService('<p>I am default</p>', 10), 'default'
|
||||
);
|
||||
//add a domain service
|
||||
$this->addSearchService(
|
||||
$this->createDefaultSearchService('<p>I am domain bar</p>', 20), 'bar'
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Test the behaviour when no domain is provided in the search pattern :
|
||||
* the default search should be enabled
|
||||
@@ -105,29 +91,6 @@ class SearchControllerTest extends WebTestCase
|
||||
$this->assertTrue($client->getResponse()->isNotFound());
|
||||
}
|
||||
|
||||
|
||||
public function testSearchWithinSpecificSearchName()
|
||||
{
|
||||
/*
|
||||
//add a search service which will be supported
|
||||
$this->addSearchService(
|
||||
$this->createNonDefaultDomainSearchService("<p>I am domain foo</p>", 100, TRUE), 'foo'
|
||||
);
|
||||
|
||||
$client = $this->getAuthenticatedClient();
|
||||
$crawler = $client->request('GET', '/fr/search',
|
||||
array('q' => '@foo default search', 'name' => 'foo'));
|
||||
|
||||
//$this->markTestSkipped();
|
||||
$this->assertEquals(0, $crawler->filter('p:contains("I am default")')->count(),
|
||||
"The mocked default results are not shown");
|
||||
$this->assertEquals(0, $crawler->filter('p:contains("I am domain bar")')->count(),
|
||||
"The mocked non-default results are not shown");
|
||||
$this->assertEquals(1, $crawler->filter('p:contains("I am domain foo")')->count(),
|
||||
"The mocked nnon default results for foo are shown");
|
||||
*/
|
||||
}
|
||||
|
||||
private function getAuthenticatedClient()
|
||||
{
|
||||
return static::createClient(array(), array(
|
||||
|
Reference in New Issue
Block a user