httpd-test-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject cvs commit: httpd-test/perl-framework/t/htdocs/php getlastmod.php
Date Sun, 09 Feb 2003 23:16:47 GMT
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 <jorton@redhat.com>
  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()); ?>
  
  
  

Mime
View raw message