我有幾個測試文件,其他人將繼承自一個文件。phpunit說我有雙重定義的類
這是父文件:
<?php
namespace Initial\Reports\Tests;
use Illuminate\Database\Eloquent\Model;
use Initial\Reports\DataFetcher;
const DONT_CARE = true;
class ReportTest extends \TestCase {
}
和所有其他的測試從上面的文件
他們都坐在同一個文件夾繼承。
,當我運行
phpunit path/to/folder/
我得到
PHP Fatal error: Cannot redeclare class Initial\Reports\Tests\ReportTest in /Users/tzookb/Sites/lps.core/app/initial/Reports/tests/ReportTest.php
「path/to/folder」或「Initial \ Reports \ Tests」命名空間中的某處必須是另一個名爲ReportTest的類。重命名一個。 – Bjorn 2015-01-04 12:55:08