austp/phpci-pho-plugin

PHPCI 运行 pho 测试的插件

1.1.3 2015-01-20 21:43 UTC

This package is auto-updated.

Last update: 2024-09-15 11:26:29 UTC


README

这是一个用于 PHPCI 的插件。它允许您通过 PHPCI 运行 pho 测试。

安装

  1. 导航到您的 PHPCI 路径。 cd /path/to/phpci

  2. 编辑 composer.json 文件。 nano composer.json

  3. "require" 部分添加 "austp\/phpci-pho-plugin": "~1.1"

     "require": {
       ...,
       ...,
       "austp\/phpci-pho-plugin": "~1.1"
     }
    
  4. 通过 composer 下载插件。 composer update austp/phpci-pho-plugin

  5. build-plugins/pho.js 复制到 /path/to/phpci/public/assets/js/build-plugins/pho.js

     cd /path/to/phpci/vendor/austp/phpci-pho-plugin/build-plugins
     cp pho.js /path/to/phpci/public/assets/js/build-plugins/pho.js
    

安装部分到此结束。继续阅读以查看可用选项。

配置

为了配置 PHPCI 运行 pho,您需要编辑 phpci.yml 文件。如果您在存储库中还没有这个文件,请添加它注意:如果您无法在存储库中添加 phpci.yml 文件,您可以在 PHPCI 中编辑您的项目并进行配置。

选项

directory:  "specs/"         | The directory to run the tests on.
log:        true             | (optional) Log pho's output to PHPCI.
executable: "/path/to/pho"   | (optional) Full path to a pho executable.
bootstrap:  "bootstrap.file" | (optional) Bootstrap file to load.
filter:     "filter"         | (optional) Run specs according to this filter.
namespace:  true             | (optional) Only use namespaced functions.

phpci.yml

  1. 导航到您的存储库。 cd /path/to/repo

  2. 编辑 phpci.yml 文件。 nano phpci.yml

  3. "test" 部分添加 \PHPCI_Pho_Plugin\Pho:

     test:
       ...:
         ...: ...
         ...: ...
       ...:
         ...: ...
       \PHPCI_Pho_Plugin\Pho:
    
  4. \PHPCI_Pho_Plugin\Pho: 行下添加您的选项。

     \PHPCI_Pho_Plugin\Pho:
       directory: "specs/"
       log: true