stas 2003/02/09 15:16:47
Added: perl-framework/t/php getlastmod.t
perl-framework/t/htdocs/php getlastmod.php
Log:
a regression test for the PHP getlastmod() function.
Submitted by: Joe Orton <[EMAIL PROTECTED]>
Reviewed by: stas
Revision Changes Path
1.1 httpd-test/perl-framework/t/php/getlastmod.t
Index: getlastmod.t
===================================================================
use strict;
use warnings FATAL => 'all';
use Apache::Test;
use Apache::TestRequest qw(GET_BODY);
use Apache::TestUtil;
use File::Spec::Functions qw(catfile);
use POSIX qw(strftime);
plan tests => 1, have_module 'php4';
my $vars = Apache::Test::vars();
my $fname = catfile $vars->{documentroot}, "php", "getlastmod.php";
my $mtime = (stat($fname))[9] || die "could not find file";
my $month = strftime "%B", gmtime($mtime);
ok t_cmp(
$month,
GET_BODY("/php/getlastmod.php"),
"getlastmod()"
);
1.1 httpd-test/perl-framework/t/htdocs/php/getlastmod.php
Index: getlastmod.php
===================================================================
<?php echo date("F", getlastmod()); ?>