phpunit

    0熱度

    1回答

    我有這樣的問題。我想排除SomeBundle \ Entity中的所有文件,但不想排除SomeBundle \ Entity \ Repository和SomeBundle \ Entity \ Factory。 SomeBundle\Entity SomeBundle\Entity\Repository SomeBundle\Entity\Factory SomeBundle\Entit

    0熱度

    1回答

    我已經建立了多個測試我laravel API,但是當我運行單元測試,我得到的是: ~api$ ./vendor/bin/phpunit tests/v1/ Time: 171 ms, Memory: 8.00MB OK (3 test, 4 assertion) 我想獲得類似命令的info方法的輸出(甚至進度條,如果測試的執行開始採取的時間長週期): $this->output->info

    0熱度

    1回答

    我試圖在DIFF視圖中爲phabricator設置覆蓋率報告。我有以下CONFIGS: .arcconfig { "project_id" : "SuperProject", "conduit_uri" : "https://phabricator.dev/", "unit.engine": "PhpunitTestEngine", "unit.phpuni

    1熱度

    3回答

    Becouse我在我的筆記本和我的destkop上開發,我也想使用一個sql server,我可以隨時連接。 我想在開發環境中連接到這個環境,並在生產環境中使用其他環境。我怎樣才能做到這一點? 我在config/database嘗試這樣: if('env' == 'development'){ $host = 'mysqlserver.alias.com'; $database

    0熱度

    1回答

    我想測試我在Laravel 5.4提出申請,但是當我在控制檯上鍵入PHPUnit命令我得到這個錯誤: PHP Warning: is_dir() expects parameter 1 to be a valid path, object given in /Users/nico/.composer/vendor/phpunit/phpunit/src/Runner/BaseTestRunner.

    1熱度

    3回答

    我正在編寫接受參數的phpunit測試用例方法。 我的代碼如下 class myTestCase extends PHPUnit_Framework_TestCase { public function testMyCase($date){ $resultSet=$this->query("select * from testCase where date='$date'

    0熱度

    1回答

    每當我嘗試使用assertResponseOk()我得到這個錯誤 Fatal error: Call to undefined method Tests\Unit\LessonsTest::assertResponseOk() in /home/faasdril/public_html/test/tests/Unit/LessonsTest.php on line 19 我可以用其他的斷言方法,我

    3熱度

    1回答

    來自Java背景,我正在研究php代碼庫並希望爲我的代碼添加單元測試。 我有如下有一個DAO類服務類: class ServiceClass { private $daoClass; public function methodToTest(){} } 我不提供一個構造函數我也不添加對daoClass屬性的設置方法。這是因爲它會使用PHP-DI IoC容器注入。對於單

    0熱度

    2回答

    我的情況是類似如下: class ToMock { public function iReturn() { return time(); } public function callMe1($arg1, $arg2) { return true; } public function callMe2(

    1熱度

    1回答

    我是新來的單元測試,遇到在PHPUnit中使用returnValueMap()時不明白的東西。我一直在Google上搜索幾天... 考慮下這個測試代碼; public function __construct(EntityManager $entityManager, AuditLog $auditLog) { $this->entityManager = $entityManager;