[svn:PHP-Sandwich] rev 1415 - PHP-Sandwich/trunk/t
[email protected] 25 Jul 2005 23:10:33 -0000
| Newsgroups | perl.php.sandwich.dev |
|---|---|
| Message-ID | <[email protected]> |
Author: gschlossnagle
Date: Mon Jul 25 16:10:33 2005
New Revision: 1415
Modified:
PHP-Sandwich/trunk/t/1.t
Log:
check for bad includes as well
Modified: PHP-Sandwich/trunk/t/1.t
==============================================================================
--- PHP-Sandwich/trunk/t/1.t (original)
+++ PHP-Sandwich/trunk/t/1.t Mon Jul 25 16:10:33 2005
@@ -1,6 +1,6 @@
#!/opt/ecelerity/3rdParty/bin/perl -w
use strict;
-use Test::More tests => 5;
+use Test::More tests => 6;
BEGIN {
use_ok 'PHP::Interpreter' or die;
@@ -11,3 +11,7 @@ ok my $p = new PHP::Interpreter(), "Crea
ok $p->include('test.inc'), 'Add test.inc';
ok my $a1 = $p->call('ident', 1), "Including a PHP file and executing a function off it";
is $a1, 1, 'We should get the proper value from the ident() function';
+eval {
+ $p->include('nonexistent.inc'), 'Add test.inc';
+};
+is $@, "Error including nonexistent.inc\n", 'Failed includes should die';