error('FooBar-Error'); $sut->warning('Hello-Warning'); $sut->success('World-Success'); $exception = new ValidationFailedException(new ConstraintViolationList([ new ConstraintViolation('123', null, [], $this, null, 123), new ConstraintViolation('456', null, [], $this, null, 456), ])); $sut->validationError($exception); $result = $output->fetch(); self::assertStringContainsString('[ERROR] FooBar-Error', $result); self::assertStringContainsString('[WARNING] Hello-Warning', $result); self::assertStringContainsString('[OK] World-Success', $result); self::assertStringContainsString('[ERROR] (123)', $result); self::assertStringContainsString('[ERROR] (456)', $result); } }