示例#1
0
 * of the GNU Lesser General Public License from time to time. Such new
 * versions will be similar in spirit to the present version, but may
 * differ in detail to address new problems or concerns.
 *
 *   Each version is given a distinguishing version number. If the
 * Library as you received it specifies that a certain numbered version
 * of the GNU Lesser General Public License "or any later version"
 * applies to it, you have the option of following the terms and
 * conditions either of that published version or of any later version
 * published by the Free Software Foundation. If the Library as you
 * received it does not specify a version number of the GNU Lesser
 * General Public License, you may choose any version of the GNU Lesser
 * General Public License ever published by the Free Software Foundation.
 *
 *   If the Library as you received it specifies that a proxy can decide
 * whether future versions of the GNU Lesser General Public License shall
 * apply, that proxy's public statement of acceptance of any version is
 * permanent authorization for you to choose that version for the
 * Library.
 */
ini_set('display_errors', 1);
error_reporting(E_ALL | E_STRICT);
require_once 'PHPSpec/Loader/UniversalClassLoader.php';
include_once 'Mockery.php';
$paths = explode(':', ini_get('include_path'));
$loader = new \PHPSpec\Loader\UniversalClassLoader();
$loader->registerNamespace('PHPSpec', $paths);
$loader->registerNamespace('Mockery', $paths);
$loader->register();
$phpspec = new \PHPSpec\PHPSpec($argv);
$phpspec->execute();
示例#2
0
<?php

if (!defined('PHPSPEC_AUTOLOAD')) {
    define('PHPSPEC_AUTOLOAD', 'PHPSPEC_AUTOLOAD');
    require_once 'PHPSpec/Loader/UniversalClassLoader.php';
    $loader = new \PHPSpec\Loader\UniversalClassLoader();
    $loader->registerNamespace('PHPSpec', '/usr/share/pear');
    $loader->register();
}
use Behat\Behat\Context\BehatContext, PHPSpec\Specification\Interceptor\InterceptorFactory;
class SpecContext extends BehatContext
{
    public function spec($actualValue)
    {
        return InterceptorFactory::create($actualValue);
    }
}