public function SettingsTest::testSerialize in Drupal 9
Same name and namespace in other branches
- 8 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 111
Class
- SettingsTest
- @coversDefaultClass \Drupal\Core\Site\Settings @runTestsInSeparateProcesses @group Site
Namespace
Drupal\Tests\Core\SiteCode
public function testSerialize() {
$this
->expectException(\LogicException::class);
serialize(new Settings([]));
}