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 inheritance chain for Phalcon\Forms\Exception, Phalcon\Loader\Exception, Phalcon\Http\Request\Exception #1772

Merged
merged 3 commits into from Jan 7, 2014
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
Next Next commit
Test case for #1770
  • Loading branch information
sjinks committed Jan 7, 2014
commit 594f8f0b6f61dcffa890152d6dcc89f8b546b442
19 changes: 19 additions & 0 deletions ext/tests/issue-1770.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
--TEST--
Make sure Phalcon\Exception inheritance chain is correct - https://github.com/phalcon/cphalcon/issues/1770
--SKIPIF--
<?php include('skipif.inc'); ?>
--FILE--
<?php
$e = new \Phalcon\Loader\Exception();
assert(!($e instanceof \Phalcon\Di\Exception));
assert($e instanceof \Phalcon\Exception);

$e = new \Phalcon\Forms\Exception();
assert(!($e instanceof \Phalcon\Di\Exception));
assert($e instanceof \Phalcon\Exception);

$e = new \Phalcon\Http\Request\Exception();
assert(!($e instanceof \Phalcon\Di\Exception));
assert($e instanceof \Phalcon\Exception);
?>
--EXPECT--