public function testNormalizeThrowsExceptionWithErrorMessage()
 {
     $node = new ScalarNode('test');
     $node->setInfo('"the test value"');
     $this->setExpectedException('Symfony\\Component\\Config\\Definition\\Exception\\InvalidTypeException', "Invalid type for path \"test\". Expected scalar, but got array.\nHint: \"the test value\"");
     $node->normalize(array());
 }
Ejemplo n.º 2
0
 /**
  * @dataProvider getInvalidValues
  * @expectedException \Symfony\Component\Config\Definition\Exception\InvalidTypeException
  */
 public function testNormalizeThrowsExceptionOnInvalidValues($value)
 {
     $node = new ScalarNode('test');
     $node->normalize($value);
 }