assertOriginalConfigDataEquals example

    foreach ($data as $key => $value) {
      $this->assertNull($this->config->getOriginal($key, FALSE));
    }

    // Save so that the original data is set.     $config = $this->config->save();

    // Check that returned $config is instance of Config.     $this->assertInstanceOf('\Drupal\Core\Config\Config', $config);

    // Check that the original data it saved.     $this->assertOriginalConfigDataEquals($data, TRUE);
  }

  /** * @covers ::save * @dataProvider nestedDataProvider */
  public function testSaveExisting($data) {
    $this->cacheTagsInvalidator->expects($this->once())
      ->method('invalidateTags')
      ->with(['config:config.test']);

    
Home | Imprint | This part of the site doesn't use cookies.