2016-05-03 12 views
0

私はcodeceptionのデータベースに接続しようとしています。 api.suite.dist.ymlとcodeception.dist.ymlファイルに以下の設定を提供しています(私はapi.suite.dist.ymlとcodeception.dist.ymlの両方で設定するためにどこに設定するかわかりませんでした)コード化DBモジュール例外

がここにここに私のapi.dist.suite.yml

class_name: ApiTester 
modules: 
enabled: 
- PhpBrowser: 
url: http://192.168.1.143 
- REST: 
depends: PhpBrowser 
url: https://dev-tv.dna.fi/api/user/guest/epg 
- \Helper\Api 
- Db: 
dsn: 'mysql:host=127.0.0.1;dbname=db' 
user: 'username' 
password: 'passsword' 

であるとすると、私のcodeception.dist.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;dbname=db' 
user: 'username' 
password: 'password' 

であり、これは私が

[Codeception \例外を取得する応答であります\ ModuleE xception]

Dbは:PDO接続に

実行[-cを作成中|] CONFIG --config:SQLSTATEは、[28000]は、[1045]のアクセスは、ユーザーwebapiuser 'の@ 'localhost' の(YESパスワードを使用して)拒否[--report] [--html [HTML]] [--xml [XML]] [--tap [TAP]] [ - JSON] [--colors] [--no-colors] [ COVERAGE-HTML]] - [COVERAGE-XML]] - [COVERAGE-XML]] - [COVERAGE-XML]] - [-g | --group GROUP] [-s | --skip SKIP] [-x | --skip-group SKIP-GROUP] [ - --env ENV] [-f | --fail-fast] [--no-rebuild] [ - ] [] []

答えて

0
  1. を使用しないでください。。 api.suite.ymlの設定で十分です。
  2. 正しい資格情報を使用していることを確認してください。

マイacceptance.suite.yml

class_name: WebGuy 
modules: 
    enabled: 
    - Db 
    config: 
     Db: 
     dsn: mysql:host=127.0.0.1;dbname=mydbname 
     user: myuser 
     password: mypass 
     populate: false 
     cleanup: false 
関連する問題