public function Ip2CountryUpdateTest::testHookUpdate8101 in IP-based Determination of a Visitor's Country 8
Tests ip2country_update_8101().
See also
File
- tests/
src/ Functional/ Update/ Ip2CountryUpdateTest.php, line 30
Class
- Ip2CountryUpdateTest
- Tests that ip2country settings are properly updated during database updates.
Namespace
Drupal\Tests\ip2country\Functional\UpdateCode
public function testHookUpdate8101() {
// Load the 'ip2country.settings' configuration settings, then check
// that it does not contain the 'batch_size' setting before the update.
$config = $this
->config('ip2country.settings');
$this
->assertNull($config
->get('batch_size'));
// Run updates.
$this
->runUpdates();
// Check that 'ip2country.settings' configuration setting 'batch_size'
// has the default value of 200 after the update.
$config = $this
->config('ip2country.settings');
$this
->assertSame(200, $config
->get('batch_size'));
}