function SettingsTest::testSerialize
Same name in other branches
- 9 core/tests/Drupal/Tests/Core/Site/SettingsTest.php \Drupal\Tests\Core\Site\SettingsTest::testSerialize()
- 10 core/tests/Drupal/Tests/Core/Site/SettingsTest.php \Drupal\Tests\Core\Site\SettingsTest::testSerialize()
- 11.x core/tests/Drupal/Tests/Core/Site/SettingsTest.php \Drupal\Tests\Core\Site\SettingsTest::testSerialize()
Ensures settings cannot be serialized.
@covers ::__sleep
File
-
core/
tests/ Drupal/ Tests/ Core/ Site/ SettingsTest.php, line 113
Class
- SettingsTest
- @coversDefaultClass \Drupal\Core\Site\Settings @group Site
Namespace
Drupal\Tests\Core\SiteCode
public function testSerialize() {
$this->expectException(\LogicException::class);
serialize(new Settings([]));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.