public function MemcacheSettingsTest::testGet in Memcache API and Integration 8.2
@covers ::get
File
- tests/
src/ Unit/ MemcacheSettingsTest.php, line 47
Class
- MemcacheSettingsTest
- @coversDefaultClass \Drupal\memcache\MemcacheSettings @group memcache
Namespace
Drupal\Tests\memcache\UnitCode
public function testGet() {
// Test stored settings.
$this
->assertEquals($this->config['memcache']['servers'], $this->settings
->get('servers'), 'The correct setting was not returned.');
$this
->assertEquals($this->config['memcache']['bin'], $this->settings
->get('bin'), 'The correct setting was not returned.');
// Test setting that isn't stored with default.
$this
->assertEquals('3', $this->settings
->get('three', '3'), 'Default value for a setting not properly returned.');
$this
->assertNull($this->settings
->get('nokey'), 'Non-null value returned for a setting that should not exist.');
}