holyshared/robo-peridot

为 peridot-php 设计的 Robo 任务

2.0.5 2015-12-05 06:47 UTC

This package is auto-updated.

Last update: 2024-09-15 15:34:26 UTC


README

robo-peridot 是一个用于在 robo 中运行 peridot 测试的库。
要使用它,必须安装 Robo PHP 任务运行器

Latest Stable Version Latest Unstable Version Build Status HHVM Status Coverage Status Dependency Status

基本用法

要使用任务,必须编写如下代码。
可用的选项包括 -grep-no-colors-reporter--bail--configuration

class RoboFile extends Tasks
{
    use \holyshared\peridot\robo\loadTasks;

    public function coverallsUpload()
    {
        $result = $this->taskPeridot()
		    ->bail()
		    ->directoryPath('spec')
		    ->run();

	    return $result;
    }
}

指定多个文件

如果指定多个文件,可以使用 filePaths 方法。
以下代码等同于 peridot spec/foo.php spec/bar.php

class RoboFile extends Tasks
{
    use \holyshared\peridot\robo\loadTasks;

    public function coverallsUpload()
    {
        $result = $this->taskPeridot()
		    ->filePaths([
		        'spec/foo.php',
		        'spec/bar.php'
		    ])
		    ->run();

	    return $result;
    }
}

测试 robo-peridot

请尝试以下命令。

composer install
composer test