File: generatetestPackage.xml.php.inc

package info (click to toggle)
php-pear 1%3A1.10.1%2Bsubmodules%2Bnotgz-9%2Bdeb9u1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 18,600 kB
  • sloc: php: 51,665; ansic: 38,629; xml: 32,572; yacc: 677; pascal: 452; makefile: 122; sh: 116
file content (43 lines) | stat: -rw-r--r-- 1,265 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php
/**
 * Generate the test package.xml for PEAR's tests
 * @package PEAR_PackageFileManager
 */
/**
 * Include the package file manager
 */
require_once('PEAR/PackageFileManager.php');
PEAR::setErrorHandling(PEAR_ERROR_DIE);
$test = new PEAR_PackageFileManager;
if (PEAR::isError($test)) {
    echo $test->getMessage();
    exit;
}
$test->setOptions(
array('baseinstalldir' => 'PEAR',
'version' => '1.4.0a10',
'packagedirectory' => dirname(__FILE__),
'state' => 'alpha',
'filelistgenerator' => 'cvs',
'roles' => array('*' => 'test'),
'notes' => 'Tests for PEAR 1.4.0a10',
'simpleoutput' => true,
'packagefile' => 'package-PEARtests.xml',
'cleardependencies' => true,
'maintainers' => array(),
'ignore' => array('generatetestPackage.xml.php.inc')));
$test->addMaintainer('cellog', 'lead', 'Greg Beaver', 'cellog@php.net');
$test->addDependency('PEAR', '1.4.0a10');
$test->addDependency('Text_Diff', false, 'has', 'pkg', true);
if (isset($_GET['make']) || (isset($_SERVER['argv']) && $_SERVER['argv'] == 'make')) {
    $e = $test->writePackageFile();
} else {
    $e = $test->debugPackageFile();
}
if (PEAR::isError($e)) {
    echo $e->getMessage();
}
if (!isset($_GET['make'])) {
    echo '<a href="' . $_SERVER['PHP_SELF'] . '?make=1">Make this file</a>';
}
?>