tests/ParserTests/Test.php
/**
	 * @param array $testFilter Test Filter as set in TestRunner
	 * @return bool if test matches the filter
	 */
@param array $testFilter Test Filter as set in TestRunner
@return bool if test matches the filter
@param array $testFilter Test Filter as set in TestRunner @return bool if test matches the filter
public function matchesFilter( $testFilter ): bool {
		if ( !$testFilter ) {
			return true;
		}
		if ( $this->testName === null ) {
			return false;
		}
		if ( !empty( $testFilter['regex'] ) ) {
			$regex = isset( $testFilter['raw'] ) ?
				   ( '/' . $testFilter['raw'] . '/' ) :
				   $testFilter['regex'];
			return (bool)preg_match( $regex, $this->testName );
		}
		if ( !empty( $testFilter['string'] ) ) {
			return strpos( $this->testName, $testFilter['raw'] ) !== false;
		}
		 because of a bad test filter
		return true;
	}
public function matchesFilter ( $ testFilter ) : bool { if ( ! $ testFilter ) { return true ; } if ( $ this -> testName === null ) { return false ; } if ( ! empty ( $ testFilter [ 'regex' ] ) ) { $ regex = isset ( $ testFilter [ 'raw' ] ) ? ( '/' . $ testFilter [ 'raw' ] . '/' ) : $ testFilter [ 'regex' ] ; return ( bool ) preg_match ( $ regex , $ this -> testName ) ; } if ( ! empty ( $ testFilter [ 'string' ] ) ) { return strpos ( $ this -> testName , $ testFilter [ 'raw' ] ) !== false ; } return true ; }
@param array $testFilter Test Filter as set in TestRunner
 @return bool if test matches the filter
@param array $testFilter Test Filter as set in TestRunner @return bool if test matches the filter
// Trivial match // No name, no match // Trivial match because of a bad test filter