formatValue(['one', 'two', 'three']); self::assertEquals('one, two, three', $result); } public function testFormatValueThrowsExceptionForNonArray(): void { $this->expectException(\InvalidArgumentException::class); $this->expectExceptionMessage('Only arrays are supported'); $formatter = new ArrayFormatter(); $formatter->formatValue('not an array'); } public function testFormatValueReturnsEmptyStringForEmptyArray(): void { $formatter = new ArrayFormatter(); $result = $formatter->formatValue([]); self::assertEquals('', $result); } }