Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/312.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Testing 将laravel安装到cloud9和phpunit测试错误_Testing_Phpunit_Laravel 5.2_Cloud9 Ide - Fatal编程技术网

Testing 将laravel安装到cloud9和phpunit测试错误

Testing 将laravel安装到cloud9和phpunit测试错误,testing,phpunit,laravel-5.2,cloud9-ide,Testing,Phpunit,Laravel 5.2,Cloud9 Ide,当我运行下面的程序时,出现了错误 (i) 在Cloud9中,安装laravel (ii)将“/app/Http/route.php”复制到“/app/Http/route_a.php” 在route_a.php中添加一些行 Route::get('/test/', function () { echo 'test'; }); (iii)我编辑“/tests/ExampleTest.php” 下面发生了错误 There was 1 failure: 1) ExampleTest::te

当我运行下面的程序时,出现了错误

(i) 在Cloud9中,安装laravel

(ii)将“/app/Http/route.php”复制到“/app/Http/route_a.php” 在route_a.php中添加一些行

Route::get('/test/', function () {
    echo 'test';
});
(iii)我编辑“/tests/ExampleTest.php”

下面发生了错误

There was 1 failure:

1) ExampleTest::testBasicExample
A request to [http://localhost/test] failed. Received status code [404].
出现错误后,注释“editRoute()”, 然后再次运行phpunit,则没有错误

请有人帮帮我。
谢谢。

您是否能够浏览Laravel安装页面?不确定您是如何安装的,但您需要在这里详细介绍一些apache的细微调整,谢谢您的评论。我可以毫不费力地翻阅这一页。但是,测试有错误。我用你们参考页上写的相同方式安装了laravel。这个问题在其他QandA网站上得到了解决。解决方案是在设置函数中运行“$this->editRoute();”。然后运行“parent::setUp();”。更改路由并设置laravel。重要的因素是秩序。这就是全部。非常感谢。
php ./vendor/bin/phpunit
There was 1 failure:

1) ExampleTest::testBasicExample
A request to [http://localhost/test] failed. Received status code [404].