get(ValidatorInterface::class); $viewParameter = new ViewParameter(); foreach (ActionType::getValues() as $value) { $this->assertNull($viewParameter->setValue($value)); $this->assertEquals($value, $viewParameter->getValue()); $errors = $validator->validate($viewParameter)->count(); $this->assertEquals(0, $errors); } $viewParameter->setValue('abc'); $errors = $validator->validate($viewParameter)->count(); $this->assertGreaterThan(0, $errors); } }