diff --git a/Classes/Domain/Model/Product/Tea.php b/Classes/Domain/Model/Product/Tea.php index 0f5875c3d..fe95f6938 100644 --- a/Classes/Domain/Model/Product/Tea.php +++ b/Classes/Domain/Model/Product/Tea.php @@ -29,7 +29,7 @@ class Tea extends AbstractEntity /** * @var string */ - private string $internalNotes; + private string $internalNotes = ''; /** * @var \TYPO3\CMS\Extbase\Domain\Model\FileReference diff --git a/Tests/Unit/Domain/Model/Product/TeaTest.php b/Tests/Unit/Domain/Model/Product/TeaTest.php index c7377bb58..25fce692a 100644 --- a/Tests/Unit/Domain/Model/Product/TeaTest.php +++ b/Tests/Unit/Domain/Model/Product/TeaTest.php @@ -72,6 +72,26 @@ public function setDescriptionSetsDescription(): void self::assertSame($value, $this->subject->getDescription()); } + /** + * @test + */ + public function getInternalNotesInitiallyEmptyString(): void + { + self::assertSame('', $this->subject->getInternalNotes()); + } + + /** + * @test + */ + public function setInternalNotesSetsInternalNotes(): void + { + $notes = 'Yery yummy! Buy lots of this!'; + + $this->subject->setInternalNotes($notes); + + self::assertSame($notes, $this->subject->getInternalNotes()); + } + /** * @test */