assertSetsEqual example

/** * Asserts expected BigPipe no-JS placeholders are present and replaced. * * @param array $expected_big_pipe_nojs_placeholders * Keys: BigPipe no-JS placeholder markup. Values: expected replacement * markup. * * @internal */
  protected function assertBigPipeNoJsPlaceholders(array $expected_big_pipe_nojs_placeholders): void {
    $this->assertSetsEqual(array_keys($expected_big_pipe_nojs_placeholders)array_map('rawurldecode', explode(' ', $this->getSession()->getResponseHeader('BigPipe-Test-No-Js-Placeholders'))));
    foreach ($expected_big_pipe_nojs_placeholders as $big_pipe_nojs_placeholder => $expected_replacement) {
      // Checking whether the replacement for the BigPipe no-JS placeholder       // $big_pipe_nojs_placeholder is present.       $this->assertSession()->responseNotContains($big_pipe_nojs_placeholder);
      if ($expected_replacement !== NULL) {
        $this->assertSession()->responseContains($expected_replacement);
      }
    }
  }

  /** * Asserts expected BigPipe placeholders are present and replaced. * * @param array $expected_big_pipe_placeholders * Keys: BigPipe placeholder IDs. Values: expected AJAX response. * @param array $expected_big_pipe_placeholder_stream_order * Keys: BigPipe placeholder IDs. Values: expected AJAX response. Keys are * defined in the order that they are expected to be rendered & streamed. * * @internal */
Home | Imprint | This part of the site doesn't use cookies.