Apache Zeta Components Manual :: File Source for regression_test.php
Source for file regression_test.php
Documentation is available at regression_test.php
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
* @version //autogentag//
* How to sort the test files: 'mtime' sorts by modification time, any other
if ( self::SORT_MODE ===
'mtime' )
// Sort by modification time to get updated tests first
array( $this, 'sortTestsByMtime' ) );
// Sort it, then the file a.in will be processed first. Handy for development.
array( $this, 'sortTestsByName' ) );
public function getName( $withDataSet =
TRUE )
$extensionLength =
strlen( $onlyWithExtension );
while ( false !==
( $file =
readdir( $path ) ) )
if ( $file !==
"." &&
$file !==
".." )
$new =
$dir .
DIRECTORY_SEPARATOR .
$file;
if ( !$onlyWithExtension ||
substr( $file, -
$extensionLength -
1 ) ===
".{$onlyWithExtension}" )
$total[] =
array( 'file' =>
$new,
if ( $a['mtime'] !=
$b['mtime'] )
return $a['mtime'] <
$b['mtime'] ?
1 : -
1;
protected function outFileName( $file, $inExtension, $outExtension =
'.out' )
return $baseFile .
$outExtension;
throw
new PHPUnit_Framework_ExpectationFailedException( "No currentFile set for test " . __CLASS__
);
while ( $this->retryTest )
$this->retryTest =
false;
if ( $exception !==
null )
public static function suite()
return new ezcMvcRegressionSuite( __CLASS__
);