public function NodeTypeThumbnailFormHelperTest::testSaveSettings in Acquia Lift Connector 8
Tests the saveSettings() method.
@covers ::saveSettings
File
- tests/
src/ Unit/ Service/ Helper/ NodeTypeThumbnailFormHelperTest.php, line 157 - Contains \Drupal\Tests\acquia_lift\Service\Helper\NodeTypeThumbnailFormHelperTest.
Class
- NodeTypeThumbnailFormHelperTest
- NodeTypeThumbnailFormHelper Test.
Namespace
Drupal\Tests\acquia_lift\Service\HelperCode
public function testSaveSettings() {
$set_settings = [
'article' => [
'some_settings',
],
];
$this->settings
->expects($this
->at(0))
->method('get')
->with('thumbnail')
->willReturn($this
->getValidThumbnailSettings());
$this->settings
->expects($this
->at(1))
->method('set')
->with('thumbnail', $set_settings)
->willReturn($this->settings);
$this->settings
->expects($this
->at(2))
->method('save');
$form_helper = new NodeTypeThumbnailFormHelper($this->configFactory, $this->entityManager);
$form_helper
->saveSettings('article', [
'some_settings',
]);
}