/[Apache-SVN]/httpd/test/trunk/perl-framework/Apache-Test/lib/Apache/TestHarnessPHP.pm
ViewVC logotype

Diff of /httpd/test/trunk/perl-framework/Apache-Test/lib/Apache/TestHarnessPHP.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

--- httpd/test/trunk/perl-framework/Apache-Test/lib/Apache/TestHarnessPHP.pm	2005/01/27 21:00:31	128426
+++ httpd/test/trunk/perl-framework/Apache-Test/lib/Apache/TestHarnessPHP.pm	2005/01/27 21:32:37	128427
@@ -103,20 +103,30 @@ sub run {
     Test::Harness::runtests($self->get_tests($args, @_));
 }
 
-sub _command {
-    return 'php';
-}
+sub _command_line {
+
+    my $self = shift;
+    my $file = shift;
+
+    return $self->SUPER::_command_line($file)
+        unless $file =~ m/\.php$/;
+
+    $file = qq["$file"] if ($file =~ /\s/) && ($file !~ /^".*"$/);
 
-sub _switches {
+    my $server_root = Apache::Test::vars('serverroot');
 
-    my $conf = catfile(Apache::Test::vars('serverroot'), 'conf');
+    $ENV{SERVER_ROOT} = $server_root;
 
+    my $conf = catfile($server_root, 'conf');
+                                                                                                                             
     my $ini = catfile($conf, 'php.ini');
 
     my $switches = join ' ', "--php-ini $ini",
                              "--define include_path=$conf";
 
-    return $switches;
+    my $line = "php $switches $file";
+                                                                                                                             
+    return $line;
 }
 
 1;

 

infrastructure at apache.org
ViewVC Help
Powered by ViewVC 1.1.26