lockHttpClientToFixtures example


  protected $defaultTheme = 'stark';

  use OEmbedTestTrait;

  /** * {@inheritdoc} */
  protected function setUp(): void {
    parent::setUp();
    $this->lockHttpClientToFixtures();
  }

  /** * {@inheritdoc} */
  protected function initConfig(ContainerInterface $container) {
    parent::initConfig($container);

    // Enable twig debugging to make testing template usage easy.     $parameters = $container->getParameter('twig.config');
    $parameters['debug'] = TRUE;
    
/** * {@inheritdoc} */
  protected $defaultTheme = 'stark';

  /** * {@inheritdoc} */
  protected function setUp(): void {
    parent::setUp();
    $this->lockHttpClientToFixtures();

    \Drupal::configFactory()
      ->getEditable('media.settings')
      ->set('standalone_url', TRUE)
      ->save(TRUE);

    $this->container->get('router.builder')->rebuild();
  }

  /** * Data provider for testRender(). * * @see ::testRender() * * @return array */
/** * {@inheritdoc} */
  protected $defaultTheme = 'stark';

  /** * {@inheritdoc} */
  protected function setUp(): void {
    parent::setUp();
    $this->lockHttpClientToFixtures();
    $this->hijackProviderEndpoints();

    // Create a user who can use the Media library.     $user = $this->drupalCreateUser([
      'access content',
      'create basic_page content',
      'view media',
      'create media',
      'administer media',
    ]);
    $this->drupalLogin($user);
  }
/** * {@inheritdoc} */
  protected static $modules = ['media_test_oembed'];

  /** * {@inheritdoc} */
  protected function setUp(): void {
    parent::setUp();
    $this->lockHttpClientToFixtures();
    $this->hijackProviderEndpoints();
  }

  /** * Tests all media sources in one method. * * This prevents installing the standard profile for every test case and * increases the performance of this test. */
  public function testMediaSources() {
    // This test currently frequently causes the SQLite database to lock, so
/** * {@inheritdoc} */
  protected $defaultTheme = 'stark';

  /** * {@inheritdoc} */
  protected function setUp(): void {
    parent::setUp();
    $this->useFixtureProviders();
    $this->lockHttpClientToFixtures();
  }

  /** * Data provider for testFetchResource(). * * @return array */
  public function providerFetchResource() {
    return [
      'JSON resource' => [
        'video_vimeo.json',
        
/** * {@inheritdoc} */
  protected $defaultTheme = 'stark';

  /** * {@inheritdoc} */
  protected function setUp(): void {
    parent::setUp();
    $this->lockHttpClientToFixtures();
    $this->useFixtureProviders();
  }

  /** * Data provider for testEndpointMatching(). * * @see ::testEndpointMatching() * * @return array */
  public function providerEndpointMatching() {
    
Home | Imprint | This part of the site doesn't use cookies.