$format]); $helper = new ActivityHelper($config); return $helper; } public function testInvalidPattern(): void { $helper = $this->createSut('sdfsdf'); self::assertEquals(ActivityHelper::PATTERN_NAME, $helper->getChoicePattern()); } public function testGetChoicePattern(): void { $helper = $this->createSut( ActivityHelper::PATTERN_NAME . ActivityHelper::PATTERN_SPACER . ActivityHelper::PATTERN_COMMENT ); self::assertEquals( ActivityHelper::PATTERN_NAME . ActivityHelper::SPACER . ActivityHelper::PATTERN_COMMENT, $helper->getChoicePattern() ); } public function testGetChoiceLabel(): void { $helper = $this->createSut(ActivityHelper::PATTERN_NAME . ActivityHelper::PATTERN_SPACER . ActivityHelper::PATTERN_COMMENT); $activity = new Activity(); $activity->setName(' - --- - -FOO BAR- --- - - - '); self::assertEquals('--- - -FOO BAR- ---', $helper->getChoiceLabel($activity)); $activity->setName('FOO BAR'); $activity->setComment('Lorem Ipsum'); self::assertEquals('FOO BAR - Lorem Ipsum', $helper->getChoiceLabel($activity)); } }