Laravel - CircleCI - 在phpunit上失败

3

我已经开始使用持续集成的过程,并且决定选择circleci。

如果需要其他信息,请告诉我,因为我现在感到迷茫。

当circleci尝试运行phpunit命令时,会返回以下错误:

我在解决这个问题上失败了。

vendor/bin/phpunit
 PHPUnit 3.7.37 by Sebastian Bergmann.

Configuration read from /home/ubuntu/simple/phpunit.xml

PHP Fatal error:  Class 'Illuminate\View\Environment' not found in /home/ubuntu/simple/vendor/laravel/framework/src/Illuminate/View/ViewServiceProvider.php on line 124

 Fatal error: Class 'Illuminate\View\Environment' not found in /home/ubuntu/simple/vendor/laravel/framework/src/Illuminate/View/ViewServiceProvider.php on line 124
vendor/bin/phpunit returned exit code 255

composer.json文件:

{
    "name": "laravel/laravel",
    "description": "The Laravel Framework.",
    "keywords": ["framework", "laravel"],
    "license": "MIT",
    "require": {
        "laravel/framework": "4.1.29",
        "cartalyst/sentry": "2.1.*",
        "vespakoen/menu": "dev-master",
        "venturecraft/revisionable": "1.8.*",
        "dompdf/dompdf" : "0.6.*",
        "baum/baum": "~1.0",
        "thujohn/pdf": "dev-master",
        "yohang/finite": "1.1.x-dev",
        "pimple/pimple": "2.1.*@dev",
        "symfony/security": "2.4.x-dev",
        "maatwebsite/excel": "1.*",
        "codesleeve/asset-pipeline": "dev-master"
    },
    "repositories": [
    {
        "type": "composer",
        "url": "http://packages.cartalyst.com"
    }
    ],
    "autoload": {
        "classmap": [
            "app/commands",
            "app/controllers",
            "app/models",
            "app/database/migrations",
            "app/database/seeds",
            "app/tests/TestCase.php",
            "app/lib"
        ],
        "psr-0": {
            "Authority": "app/",
            "Acme": "app/"
        }
    },
    "config": {
        "preferred-install": "dist",
        "frozennode/administrator": "dev-master"
    },
    "require-dev": {
        "barryvdh/laravel-debugbar": "1.*",
        "way/generators": "2.*",
        "codeception/codeception":"@stable",
        "zizaco/factory-muff": "dev-master",
        "zizaco/testcases-laravel": "dev-master",
        "mockery/mockery": "dev-master",
        "phpspec/phpspec": "~2.0",
        "behat/behat": "~2.5.1",
        "behat/mink": "~1.5.0",
        "behat/mink-extension": "~1.2.0",
        "behat/mink-goutte-driver": "~1.0.9",
        "behat/mink-selenium2-driver": "~1.1.1",
        "phpunit/phpunit": "3.7.37",
        "onigoetz/profiler":"dev-master",
        "benconstable/phpspec-laravel": "~1.0"
    },
    "minimum-stability": "beta"
}

circle.yml 文件

machine:
  timezone:
    Africa/Johannesburg
  php:
    version: 5.4.21
  hosts:
    app.test: 127.0.0.1

test:
  override:
    - vendor/bin/phpunit
1个回答

4

您之前尝试过运行Composer吗?请尝试将以下内容添加到您的circleci.yml文件中:

dependencies:
  override:
    - composer install --prefer-source --no-interaction --no-dev

我尝试了建议的解决方案,它确实解决了原始问题,但出现了一个与 whoops 库相关的新问题。我会尝试找出我的本地环境和 Forge 之间的区别。谢谢。 - Daniel Jacobs
太好了。我刚刚在Circle上设置了Laravel和Selenium,如果你需要帮助,请联系我。 - Visti K

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接