Esempio n. 1
0
 function __construct($__DIR__)
 {
     set_include_path($__DIR__);
     $c = \Pyrus\Config::singleton(dirname($__DIR__), dirname($__DIR__) . '/pearconfig.xml');
     $c->bin_dir = $__DIR__ . '/bin';
     restore_include_path();
     $c->saveConfig();
     $chan = new PEAR2\SimpleChannelServer\Channel('pear2.php.net', 'unit test channel');
     $scs = new PEAR2\SimpleChannelServer\Main($chan, $__DIR__, dirname($__DIR__) . '/PEAR2');
     $scs->saveChannel();
     $this->chan = $chan;
     $this->scs = $scs;
     $this->__DIR__ = $__DIR__;
 }
Esempio n. 2
0
 *
 * P1 -> P2 min 1.1.0, exclude 1.2.0
 * P3 -> P2 max 1.3.0, exclude 1.2.3
 *
 * P2 only has releases for 1.0.0, 1.2.0, 1.2.3, and 1.3.1
 *
 * to test composite dep failure
 */
require __DIR__ . '/../../../../../autoload.php';
set_include_path(__DIR__);
$c = \Pyrus\Config::singleton(dirname(__DIR__), dirname(__DIR__) . '/pearconfig.xml');
$c->bin_dir = __DIR__ . '/bin';
restore_include_path();
$c->saveConfig();
$chan = new PEAR2\SimpleChannelServer\Channel('pear2.php.net', 'unit test channel');
$scs = new PEAR2\SimpleChannelServer\Main($chan, __DIR__, dirname(__DIR__) . '/PEAR2');
$scs->saveChannel();
$pf = new \Pyrus\PackageFile\v2();
for ($i = 1; $i <= 6; $i++) {
    file_put_contents(__DIR__ . "/glooby{$i}", 'hi');
}
$pf->name = 'P1';
$pf->channel = 'pear2.php.net';
$pf->summary = 'testing';
$pf->version['release'] = '1.0.0';
$pf->stability['release'] = 'stable';
$pf->description = 'hi description';
$pf->notes = 'my notes';
$pf->maintainer['cellog']->role('lead')->email('*****@*****.**')->active('yes')->name('Greg Beaver');
$pf->setPackagefile(__DIR__ . '/package.xml');
$save = clone $pf;
Esempio n. 3
0
$certinfo = array();
$pkcs = openssl_pkcs12_read(file_get_contents($cert[0]), $certinfo, $cert[1]);
if (!$pkcs) {
    die('Invalid certificate: ' . $cert[0] . ', or invalid password');
}

require __DIR__ . '/../../../../../autoload.php';

set_include_path(__DIR__);
$c = \PEAR2\Pyrus\Config::singleton(dirname(__DIR__), dirname(__DIR__) . '/pearconfig.xml');
$c->bin_dir = __DIR__ . '/bin';
restore_include_path();
$c->saveConfig();

$chan = new PEAR2\SimpleChannelServer\Channel('pear2.php.net', 'unit test channel');
$scs = new PEAR2\SimpleChannelServer\Main($chan, __DIR__, dirname(__DIR__) . '/PEAR2');

$scs->saveChannel();

$pf = new \PEAR2\Pyrus\PackageFile\v2;

for ($i = 1; $i <= 1; $i++) {
    file_put_contents(__DIR__ . "/glooby$i", 'hi');
}

$pf->name = 'P1';
$pf->channel = 'pear2.php.net';
$pf->summary = 'testing';
$pf->version['release'] = '1.0.0';
$pf->stability['release'] = 'stable';
$pf->description = 'hi description';