我在窗口7上安装了Laravel,我收到了错误消息

时间:2016-07-06 11:56:29

标签: php laravel-5 phpunit

我在运行演示文件时安装了laravel,它给了我错误信息。错误信息是: -

     Class 'Illuminate\Foundation\Testing\TestCase' not found in D:\xampp\htdocs\laravel\tests\TestCase.php on line 4

为了解决这个问题我尝试在命令提示符下运行phpunit app / tests / command但没有任何事情发生。我的composer.json文件是: -

  {
   "name": "laravel/laravel",
   "description": "The Laravel Framework.",
   "keywords": ["framework", "laravel"],
   "license": "MIT",
   "type": "project",
   "require": {
    "php": ">=5.5.9",
    "laravel/framework": "5.2.*"
  },
"require-dev": {
    "fzaninotto/faker": "~1.4",
    "mockery/mockery": "0.9.*",
    "phpunit/phpunit": "~4.0",
    "symfony/css-selector": "2.8.*|3.0.*",
    "symfony/dom-crawler": "2.8.*|3.0.*"
},
"autoload": {
    "classmap": [
        "database"
    ],
    "psr-4": {
        "App\\": "app/"
    }
},
"autoload-dev": {
    "classmap": [
        "tests/TestCase.php"
    ]
},
"scripts": {
    "post-root-package-install": [
        "php -r \"copy('.env.example', '.env');\""
    ],
    "post-create-project-cmd": [
        "php artisan key:generate"
    ],
    "post-install-cmd": [
        "Illuminate\\Foundation\\ComposerScripts::postInstall",
        "php artisan optimize"
    ],
    "post-update-cmd": [
        "Illuminate\\Foundation\\ComposerScripts::postUpdate",
        "php artisan optimize"
    ]
},
"config": {
    "preferred-install": "dist"
}

}

1 个答案:

答案 0 :(得分:0)

您是否在laravel项目根目录中获得了测试文件夹?它内部是否有TestCase.php?