-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1339 from sjinks/tests
Fix bug in Phalcon\Tag\Select::selectField()
- Loading branch information
Showing
29 changed files
with
676 additions
and
568 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
--TEST-- | ||
Segmentation fault when calling Phalcon\Validation\Message\Group::offsetSet() with a non-object - https://github.com/phalcon/cphalcon/issues/741 | ||
--SKIPIF-- | ||
<?php include('skipif.inc'); ?> | ||
--FILE-- | ||
<?php | ||
$group = new \Phalcon\Validation\Message\Group; | ||
try { | ||
$group[0] = 'invalid'; | ||
} | ||
catch (Exception $e) { | ||
echo $e->getMessage(), PHP_EOL; | ||
} | ||
|
||
try { | ||
$group->appendMessage('invalid'); | ||
} | ||
catch (Exception $e) { | ||
echo $e->getMessage(), PHP_EOL; | ||
} | ||
?> | ||
--EXPECT-- | ||
The message must be an object | ||
The message must be an object |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--TEST-- | ||
Segmentation Fault in Phalcon\Validation::bind() - https://github.com/phalcon/cphalcon/pull/743 | ||
--SKIPIF-- | ||
<?php include('skipif.inc'); ?> | ||
--FILE-- | ||
<?php | ||
$v = new \Phalcon\Validation; | ||
try { | ||
$v->bind(0, 0); | ||
} | ||
catch (Exception $e) { | ||
echo $e->getMessage(), PHP_EOL; | ||
} | ||
?> | ||
--EXPECT-- | ||
The entity must be an object |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
--TEST-- | ||
Segmentation Fault in Phalcon\Tag::setDI() and setDefaults() - https://github.com/phalcon/cphalcon/pull/744 | ||
--SKIPIF-- | ||
<?php include('skipif.inc'); ?> | ||
--FILE-- | ||
<?php | ||
class DIDescendant extends Phalcon\DI {} | ||
|
||
$v = new \Phalcon\Tag(); | ||
|
||
try { | ||
$v->setDI(0); | ||
assert(false); | ||
} | ||
catch (Exception $e) { | ||
echo $e->getMessage(), PHP_EOL; | ||
} | ||
|
||
/* This won't work — we do not validate DI yet :-( | ||
try { | ||
$v->setDI(new \stdClass()); | ||
assert(false); | ||
} | ||
catch (Exception $e) { | ||
echo $e->getMessage(), PHP_EOL; | ||
} | ||
*/ | ||
|
||
$v->setDI(new \Phalcon\DI()); | ||
echo "OK", PHP_EOL; | ||
|
||
$v->setDI(new \DIDescendant()); | ||
echo "OK", PHP_EOL; | ||
|
||
try { | ||
$v->setDefaults(0); | ||
assert(false); | ||
} | ||
catch (Exception $e) { | ||
echo $e->getMessage(), PHP_EOL; | ||
} | ||
?> | ||
--EXPECT-- | ||
Parameter dependencyInjector must be an Object | ||
OK | ||
OK | ||
An array is required as default values |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
config.db.local.php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.