Skip to content
Snippets Groups Projects
Commit 64ed456e authored by Christian Fritsch's avatar Christian Fritsch Committed by Joris Vercammen
Browse files

Issue #3126196 by chr.fritsch: Tests are failing on D9

parent 4f3e10bd
No related branches found
No related tags found
No related merge requests found
Showing
with 25 additions and 15 deletions
name: 'Rest view'
type: module
description: 'Provides a Search API + rest dependency to execute tests.'
package: 'Search'
core: 8.x
package: 'Testing'
hidden: true
dependencies:
- drupal:rest
......
......@@ -5,9 +5,9 @@ namespace Drupal\Tests\facets_summary\Functional;
use Drupal\Core\Language\LanguageInterface;
use Drupal\search_api\Item\Field;
use Drupal\taxonomy\Entity\Term;
use Drupal\Tests\taxonomy\Functional\TaxonomyTestTrait;
use Drupal\Tests\field\Traits\EntityReferenceTestTrait;
use Drupal\Tests\facets\Functional\FacetsTestBase;
use Drupal\Tests\taxonomy\Traits\TaxonomyTestTrait;
/**
* Tests the hierarchical facets implementation.
......
......@@ -25,6 +25,11 @@ abstract class FacetSummaryResourceTestBase extends EntityResourceTestBase {
*/
protected static $labelFieldName = 'name';
/**
* {@inheritdoc}
*/
protected $defaultTheme = 'stark';
/**
* {@inheritdoc}
*/
......
name: 'Facets custom widget'
type: module
description: 'Facets custom widget'
package: 'Search'
core_version_requirement: ^8.8 || ^9
package: 'Testing'
hidden: true
name: 'Facets events test'
type: module
description: 'Facets events test'
package: 'Search'
core_version_requirement: ^8.8 || ^9
package: 'Testing'
hidden: true
name: 'Facets query processor'
type: module
description: 'Facets query processor'
package: 'Search'
core_version_requirement: ^8.8 || ^9
package: 'Testing'
hidden: true
name: 'Facets Search API dependecy'
type: module
description: 'Provides a Search API dependecy.'
package: 'Search'
core_version_requirement: ^8.8 || ^9
package: 'Testing'
hidden: true
dependencies:
- search_api:search_api
......
......@@ -110,7 +110,7 @@ class BreadcrumbIntegrationTest extends FacetsTestBase {
$this->drupalGet('search-api-test-fulltext', ['query' => $initial_query]);
$this->clickLink('item');
$breadcrumb = $this->getSession()->getPage()->find('css', '.breadcrumb');
$this->assertTrue(strpos($breadcrumb->getText(), 'Type'));
$this->assertNotFalse(strpos($breadcrumb->getText(), 'Type'));
}
/**
......
......@@ -83,7 +83,7 @@ class LanguageIntegrationTest extends FacetsTestBase {
$this->clickLink('item');
// Check that the language code is still in the url.
$this->assertTrue(strpos($this->getUrl(), 'xx-lolspeak/'), 'Found the language code in the url');
$this->assertNotFalse(strpos($this->getUrl(), 'xx-lolspeak/'), 'Found the language code in the url');
$this->assertSession()->statusCodeEquals(200);
$this->assertSession()->pageTextContains('item');
$this->assertSession()->pageTextContains('article');
......
......@@ -25,6 +25,11 @@ abstract class FacetResourceTestBase extends EntityResourceTestBase {
*/
protected static $labelFieldName = 'name';
/**
* {@inheritdoc}
*/
protected $defaultTheme = 'stark';
/**
* {@inheritdoc}
*/
......
......@@ -25,6 +25,11 @@ abstract class FacetSourceResourceTestBase extends EntityResourceTestBase {
*/
protected static $labelFieldName = 'name';
/**
* {@inheritdoc}
*/
protected $defaultTheme = 'stark';
/**
* {@inheritdoc}
*/
......
......@@ -65,7 +65,7 @@ trait TestHelperTrait {
foreach ($this->blocks as $block) {
$xpath = $this->xpath('//div[@id = :id]/div[@class="facet-empty"]', [':id' => 'block-' . $block->id()]);
if (!$xpath) {
$this->assertFalse($xpath);
$this->assertEmpty($xpath);
}
else {
$this->assertTrue($this->xpath('//div[@id = :id]/div[@class="facet-empty"]', [':id' => 'block-' . $block->id()]));
......
......@@ -199,7 +199,7 @@ class UrlIntegrationTest extends FacetsTestBase {
foreach ($content_types as $content_type) {
$this->drupalGet('search-api-test-fulltext');
$this->clickLink('2');
$this->assertTrue(strpos($this->getUrl(), 'page=1'));
$this->assertNotFalse(strpos($this->getUrl(), 'page=1'));
$this->clickLink($content_type);
$this->assertFalse(strpos($this->getUrl(), 'page=1'));
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment