小编est*_*s92的帖子

Composer自动加载不适用于Travis CI中的测试

我知道,好像Composer或Travis不起作用,我不能很好地完成那项工作,我不明白autoload是如何在本地运行而不是在Travis构建中运行.如果有人能够阐明我的这个问题,我将非常感激.

当你找不到一个界面时,会显示问题......因为当你没有看到"namespace \namespace\interface"时弹出错误,我认为应该是自动加载,不应该加载得很好在特拉维斯考试.

这是:

PHP Fatal error:  Interface 'RestGalleries\Interfaces\User' not found in /home/travis/build/estebanmatias92/RestGalleries/src/RestGalleries/APIs/Flickr/FlickrUser.php on line 15
PHP Stack trace:
PHP   1. {main}() /home/travis/.phpenv/versions/5.4.25/bin/phpunit:0
PHP   2. PHPUnit_TextUI_Command::main() /home/travis/.phpenv/versions/5.4.25/bin/phpunit:46
PHP   3. PHPUnit_TextUI_Command->run() /home/travis/.phpenv/versions/5.4.25/share/pyrus/.pear/php/PHPUnit/TextUI/Command.php:129
PHP   4. PHPUnit_TextUI_TestRunner->doRun() /home/travis/.phpenv/versions/5.4.25/share/pyrus/.pear/php/PHPUnit/TextUI/Command.php:176
PHP   5. PHPUnit_Framework_TestSuite->run() /home/travis/build/estebanmatias92/RestGalleries/vendor/phpunit/phpunit/PHPUnit/TextUI/TestRunner.php:349
PHP   6. PHPUnit_Framework_TestSuite->run() /home/travis/build/estebanmatias92/RestGalleries/vendor/phpunit/phpunit/PHPUnit/Framework/TestSuite.php:705
PHP   7. PHPUnit_Framework_TestSuite->run() /home/travis/build/estebanmatias92/RestGalleries/vendor/phpunit/phpunit/PHPUnit/Framework/TestSuite.php:705
PHP   8. PHPUnit_Framework_TestSuite->runTest() /home/travis/build/estebanmatias92/RestGalleries/vendor/phpunit/phpunit/PHPUnit/Framework/TestSuite.php:745
PHP   9. PHPUnit_Framework_TestCase->run() /home/travis/build/estebanmatias92/RestGalleries/vendor/phpunit/phpunit/PHPUnit/Framework/TestSuite.php:775
PHP  10. PHPUnit_Framework_TestResult->run() /home/travis/build/estebanmatias92/RestGalleries/vendor/phpunit/phpunit/PHPUnit/Framework/TestCase.php:783
PHP  11. PHPUnit_Framework_TestCase->runBare() /home/travis/build/estebanmatias92/RestGalleries/vendor/phpunit/phpunit/PHPUnit/Framework/TestResult.php:648
PHP  12. PHPUnit_Framework_TestCase->runTest() /home/travis/build/estebanmatias92/RestGalleries/vendor/phpunit/phpunit/PHPUnit/Framework/TestCase.php:838
PHP  13. ReflectionMethod->invokeArgs() /home/travis/build/estebanmatias92/RestGalleries/vendor/phpunit/phpunit/PHPUnit/Framework/TestCase.php:983
PHP  14. RestGalleriesTest->testFindUserReturnApiUserObject() /home/travis/build/estebanmatias92/RestGalleries/vendor/phpunit/phpunit/PHPUnit/Framework/TestCase.php:983
PHP  15. Composer\Autoload\ClassLoader->loadClass() /home/travis/build/estebanmatias92/RestGalleries/vendor/phpunit/phpunit/PHPUnit/Framework/TestCase.php:0
PHP …
Run Code Online (Sandbox Code Playgroud)

php autoload travis-ci composer-php

2
推荐指数
1
解决办法
811
查看次数

标签 统计

autoload ×1

composer-php ×1

php ×1

travis-ci ×1