예제 #1
0
 /**
  * This method is called before the first test of this test class is run.
  *
  * @since Method available since Release 3.4.0
  */
 public static function setUpBeforeClass()
 {
     $stream = new StreamOutput(fopen('php://memory', 'w', false));
     self::$client = new Client();
     self::$client->init($stream, ':memory:');
 }
예제 #2
0
<?php

use phparsenal\fastforward\Client;
require __DIR__ . DIRECTORY_SEPARATOR . 'vendor/autoload.php';
// Replace the path to *this* PHP file with the alias because the usage summary
// relies on this.
if ($argc > 0) {
    $argv[0] = 'ff';
}
$client = new Client('fast-forward', Client::FF_VERSION);
$client->init();
try {
    $client->run();
} catch (\Exception $e) {
    $msg = array($e->getMessage(), $e->getTraceAsString());
    $client->getOutput()->error($msg);
}