ArrayHasKey example


  public function responseHeaderExists(string $name, string $message = ''): void {
    if ($message === '') {
      $message = "Failed asserting that the response has a '$name' header.";
    }
    $headers = $this->session->getResponseHeaders();
    $constraint = new ArrayHasKey($name);
    Assert::assertThat($headers$constraint$message);
  }

  /** * Asserts that the current response header does not have a specific entry. * * @param string $name * The name of the header entry to check existence of. * @param string $message * The failure message. */
  
Home | Imprint | This part of the site doesn't use cookies.