function CommentHostnameUpdateTest::testCommentPostUpdateAddIpAddressSetting
Tests comment_post_update_add_ip_address_setting().
See also
comment_post_update_add_ip_address_setting()
File
-
core/
modules/ comment/ tests/ src/ Functional/ Update/ CommentHostnameUpdateTest.php, line 51
Class
- CommentHostnameUpdateTest
- Tests that comment hostname settings are properly updated.
Namespace
Drupal\Tests\comment\Functional\UpdateCode
public function testCommentPostUpdateAddIpAddressSetting() {
/** @var \Drupal\Core\Config\ConfigFactoryInterface $factory */
$factory = $this->container
->get('config.factory');
$settings = $factory->listAll('comment.settings');
$this->assertEmpty($settings);
$this->runUpdates();
$settings = $factory->get('comment.settings');
// Check that settings default value was set.
$this->assertEquals(TRUE, $settings->get('log_ip_addresses'));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.