【发布时间】:2014-01-15 23:07:17
【问题描述】:
我使用Guard 进行持续测试。
我的 Guardfile 是
guard :phpunit2, :all_on_start => false, :tests_path => 'app/tests/', :cli => '--colors -c phpunit.xml' do
# Run any test in app/tests upon save.
watch(%r{^.+Test\.php$})
# When a view file is updated, run tests.
# Tip: you probably only want to run your integration tests.
watch(%r{app/views/.+\.php}) { Dir.glob('app/tests/**/*.php') }
# When a file is edited, try to run its associated test.
# Save app/models/User.php, and it will run app/tests/models/UserTest.php
watch(%r{^app/(.+)/(.+)\.php$}) { |m| "app/tests/#{m[1]}/#{m[2]}Test.php"}
end
我从作曲家"phpunit/phpunit": "3.7.*"开始安装phpunit
但是当我使用警卫时:
ERROR - phpunit is not installed on your machine.
我使用 phpunit 的 CLI 是 vendor/bin/phpunit
所以,我尝试在 Guardfile 中添加 :command => "vendor/bin/phpunit" 到保护配置中
完整配置:
guard :phpunit2, :all_on_start => false, :tests_path => 'app/tests/', :command => "vendor/bin/phpunit", :cli => '--colors -c phpunit.xml' do
但是,我总是出错
ERROR - phpunit is not installed on your machine.
怎么做? 谢谢
【问题讨论】:
标签: tdd laravel-4 phpunit guard