Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. MockClientStrategy.php

function MockClientStrategy::getCandidates

Overrides DiscoveryStrategy::getCandidates

File

vendor/php-http/discovery/src/Strategy/MockClientStrategy.php, line 16

Class

MockClientStrategy
Find the Mock client.

Namespace

Http\Discovery\Strategy

Code

public static function getCandidates($type) {
    if (is_a(HttpClient::class, $type, true) || is_a(HttpAsyncClient::class, $type, true)) {
        return [
            [
                'class' => Mock::class,
                'condition' => Mock::class,
            ],
        ];
    }
    return [];
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal