Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix misleading diagnostics on exception #1297

Merged
merged 2 commits into from Sep 26, 2013
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Regression test
  • Loading branch information
sjinks committed Sep 26, 2013
commit 1b4f5f271c2e329a06acf66e0130ce329554367f
21 changes: 21 additions & 0 deletions ext/tests/issue-1297.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
--TEST--
Misleading diagnostocs on exception - https://github.com/phalcon/cphalcon/pull/1297
--SKIPIF--
<?php include('skipif.inc'); ?>
--FILE--
<?php
try {
$object = new stdClass();
$form = new \Phalcon\Forms\Form($object);
$form->add(new \Phalcon\Forms\Element\Text("title"));
echo $form->render('title');
}
catch (\Exception $e) {
echo $e->getMessage(), PHP_EOL;
}

echo "OK", PHP_EOL;
?>
--EXPECT--
A dependency injector container is required to obtain the "escaper" service
OK