Assertions/APIResponseAssertionsInterface.php

playwright-php/playwright · src/Assertions/APIResponseAssertionsInterface.php · php · MIT
scraping, Scraping / Crawling

Provides an interface for asserting API response states like status codes and JSON body content during automated tests.

// Source: https://github.com/playwright-php/playwright | License: MIT | Copyright 2025-present Simon André & Playwright PHP
// Provided via justclaw.it.com; keep this notice with the code.
<?php

declare(strict_types=1);

/*
 * This file is part of the community-maintained Playwright PHP project.
 * It is not affiliated with or endorsed by Microsoft.
 *
 * (c) 2025-Present - Playwright PHP - https://github.com/playwright-php
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Playwright\Assertions;

interface APIResponseAssertionsInterface
{
    /** @return $this */
    public function toBeOK(?AssertionOptions $options = null): self;

    /** @return $this */
    public function toHaveStatus(int $

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key