public function NodeTypePreviewImageFormTest::testSaveSettings in Acquia Content Hub 8
Tests the saveSettings() method.
@covers ::saveSettings
File
- tests/
src/ Unit/ Form/ NodeTypePreviewImageFormTest.php, line 216
Class
- NodeTypePreviewImageFormTest
- PHPUnit test for the NodeTypePreviewImageForm class.
Namespace
Drupal\Tests\acquia_contenthub\Unit\FormCode
public function testSaveSettings() {
$this->contenthubEntityConfig
->expects($this
->at(0))
->method('setPreviewImageField')
->with('article', 'some_field');
$this->contenthubEntityConfig
->expects($this
->at(1))
->method('setPreviewImageStyle')
->with('article', 'some_style');
$this->contenthubEntityConfig
->expects($this
->at(2))
->method('save');
$preview_image_form = new NodeTypePreviewImageForm($this->contenthubEntityManager, $this->entityTypeManager, $this->entityFieldManager);
$preview_image_form
->saveSettings('article', [
'field' => 'some_field',
'style' => 'some_style',
]);
}