【发布时间】:2015-08-31 14:41:08
【问题描述】:
我有一个 php 项目,它具有 composer 依赖项,这些依赖项在我的单元测试的代码路径中进行了固有的测试。这是我的示例代码:
<?php
// where FooBar is a composer package but I'm purposely typing it incorrectly here
use \fooBaR
public function appendNameToWords(array $words, $name)
{
$start = microtime(true);
$newWords = array_map(function($word){
return $word . $name;
}, $words);
// logs the diff between start and end time
FooBar::logTimer($start);
return $newWords;
}
我的测试只是测试方法,但当然会在我的源代码中执行FooBar::logTimer 行。问题是如果我将FooBar 类错误输入为fooBaR,我预计我的测试会失败。不幸的是,travis 构建正在通过......但我不清楚为什么。
.travis.yml文件:
language: php
php:
- 5.6
install: script/install
script:
- script/test
对可能出现的问题有任何想法吗?
【问题讨论】:
标签: filesystems phpunit composer-php travis-ci case-sensitive