From 41889b202f34377873b55cde98656c7b7856c816 Mon Sep 17 00:00:00 2001 From: Vladimir Kolesnikov Date: Wed, 9 Oct 2013 15:50:32 +0300 Subject: [PATCH] Test for #1349 --- ext/tests/issue-1349.phpt | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 ext/tests/issue-1349.phpt diff --git a/ext/tests/issue-1349.phpt b/ext/tests/issue-1349.phpt new file mode 100644 index 00000000000..82d6a1f0e0e --- /dev/null +++ b/ext/tests/issue-1349.phpt @@ -0,0 +1,12 @@ +--TEST-- +Phalcon\Forms\Form::getMessages() produces PHP error if form is valid - https://github.com/phalcon/cphalcon/issues/1349 +--SKIPIF-- + +--FILE-- +add(new \Phalcon\Forms\Element\Text('name')); +$form->isValid(array('name' => 'John')); +assert(get_class($form->getMessages(false)) == 'Phalcon\Validation\Message\Group'); +?> +--EXPECT--