Commit 3a7fc38f authored by Joris Vercammen's avatar Joris Vercammen Committed by Thomas Seiber
Browse files

Issue #2659868 by borisson_, drunken monkey: Fixed CacheabilityTest to make...

Issue #2659868 by borisson_, drunken monkey: Fixed CacheabilityTest to make sure it displays the rendered entities.
parent 6ab1b0a9
Loading
Loading
Loading
Loading
+2 −0
Changes for CHANGELOG.txt: 2 added lines, 0 removed lines.
Original line number Diff line number Diff line
Search API 1.x, dev (xxxx-xx-xx):
---------------------------------
- #2659868 by borisson_, drunken monkey: Fixed CacheabilityTest to make sure it
  displays the rendered entities.
- #2853049 by Blanca.Esqueda: Fixed config schema error for Views date filters.
- #2847810 by JayKandari: Added Stemmer to ProcessorIntegrationTest.
- #2753667 by pfrenssen, drunken monkey, borisson_, idimopoulos, sandervd,
+5 −11
Changes for tests/src/Functional/CacheabilityTest.php: 5 added lines, 11 removed lines.
Original line number Diff line number Diff line
@@ -13,13 +13,6 @@ class CacheabilityTest extends SearchApiBrowserTestBase {

  use ExampleContentTrait;

  /**
   * The ID of the search server used for this test.
   *
   * @var string
   */
  protected $serverId;

  /**
   * {@inheritdoc}
   */
@@ -36,14 +29,11 @@ class CacheabilityTest extends SearchApiBrowserTestBase {
  public function setUp() {
    parent::setUp();

    // Add a test server and index.
    $this->getTestServer();
    $this->getTestIndex();

    // Set up example structure and content and populate the test index with
    // that content.
    $this->setUpExampleStructure();
    $this->insertExampleContent();

    \Drupal::getContainer()
      ->get('search_api.index_task_manager')
      ->addItemsAll(Index::load($this->indexId));
@@ -61,6 +51,10 @@ class CacheabilityTest extends SearchApiBrowserTestBase {
    $this->assertSession()->statusCodeEquals(200);
    $this->assertSession()->responseHeaderEquals('x-drupal-dynamic-cache', 'UNCACHEABLE');
    $this->assertTrue(strpos($this->drupalGetHeader('cache-control'), 'no-cache'));

    // Verify that the search results are displayed.
    $this->assertSession()->pageTextContains('foo test');
    $this->assertSession()->pageTextContains('foo baz');
  }

}
+1 −1
Changes for tests/src/Functional/SearchApiBrowserTestBase.php: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -81,7 +81,7 @@ abstract class SearchApiBrowserTestBase extends BrowserTestBase {
   *
   * @var string
   */
  protected $indexId;
  protected $indexId = 'database_search_index';

  /**
   * {@inheritdoc}
+0 −7
Changes for tests/src/Functional/ViewsTest.php: 0 added lines, 7 removed lines.
Original line number Diff line number Diff line
@@ -38,13 +38,6 @@ class ViewsTest extends SearchApiBrowserTestBase {
    'rest',
  ];

  /**
   * A search index ID.
   *
   * @var string
   */
  protected $indexId = 'database_search_index';

  /**
   * {@inheritdoc}
   */