當我Codeception在Laravel運行功能測試,每一個現在,然後我得到的錯誤:Codeception錯誤:調用未定義的方法異常:: getStatusCode()
[Symfony\Component\Debug\Exception\FatalErrorException]
Call to undefined method Exception::getStatusCode()
這些都是我CONFIGS:
codeception.yml
actor: Tester
paths:
tests: tests
log: tests/_output
data: tests/_data
support: tests/_support
envs: tests/_envs
settings:
bootstrap: _bootstrap.php
colors: true
memory_limit: 1024M
extensions:
enabled:
- Codeception\Extension\RunFailed
modules:
config:
Db:
dsn: 'mysql:host=127.0.0.1;port=3306;dbname=la51'
user: 'root'
password: 'root'
populate: false
cleanup: false
reconnect: true
functional.suite.yml
class_name: FunctionalTester
modules:
enabled:
# add framework module here
- \Helper\Functional
- Asserts
- Db
- Laravel5
config:
Laravel5:
cleanup: false
這是我在終點站下車時,我 「codecept運行」:
Rubens-MacBook-Pro:la51 rubenbijker$ codecept run -vvv
Codeception PHP Testing Framework v2.1.3
Powered by PHPUnit 4.8.10 by Sebastian Bergmann and contributors.
Acceptance Tests (0) ------------------------
Modules: PhpBrowser, \Helper\Acceptance
---------------------------------------------
---------------------------------------------
Functional Tests (9) -------------------------------------------------------------------------------------------------------------------------------
Modules: \Helper\Functional, Asserts, Db, Laravel5
----------------------------------------------------------------------------------------------------------------------------------------------------
Create a boat (AdminCreatesBoatCept)
Scenario:
* As an a guest
* I am on page ""
[Symfony\Component\Debug\Exception\FatalErrorException]
Call to undefined method Exception::getStatusCode()
[Symfony\Component\Debug\Exception\FatalErrorException]
Call to undefined method Exception::getStatusCode()
FATAL ERROR. TESTS NOT FINISHED.
Call to undefined method Exception::getStatusCode()
in /Applications/MAMP/htdocs/la51/app/Exceptions/Handler.php:71
Rubens-MacBook-Pro:la51 rubenbijker$
我報告了Codeception的問題,但他們說這是Laravel錯誤,所以他們不能幫助我。 這是由於我的代碼中的錯誤造成的?或者通過Codeception和Laravel之間的配置錯誤?
這意味着拋出的異常不會聲明方法「getStatusCode」 –
什麼版本的Codeception?它看起來像一個錯誤。請通過https://github.com/Codeception/Codeception/issues – Naktibalda
Codeception版本2.1.3報告問題。我會在github上報告它。謝謝。 – SiteHopper