Ich versuche, eine Verbindung zu meinem db in Codeception herzustellen. Ich habe folgende Konfigurationen in meiner Datei api.suite.dist.yml und codeception.dist.yml (ich wusste nicht, wo ich Konfigurationen bereitstellen soll, so dass ich sowohl api.suite.dist.yml als auch codeception.dist.yml zur Verfügung stelle)Codeception DB-Modul Ausnahme
hier ist mein 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'
und hier ist mein 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'
und dies ist die Antwort i
[Codeception \ Exception erhalten \ ModulE xception]
Db: SQLSTATE [28000] [1045] Zugriff verweigert für Benutzer 'webapiuser' @ 'localhost' (using password: YES) beim Erstellen PDO Verbindung
run [-c | --config CONFIG] [--report] [--html [HTML]] [- XML [XML]] [--tap [TAP]] [--json [JSON]] [--Farben] [--No-Farben] [ --silent] [--steps] [-d | --debug] [--cover [COVERAGE]] [--coverage-html [COVERAGE-HTML]] [--coverage-xml [COVERAGE-XML]] [ --coverage-text [COVERAGE-TEXT]] [--no-exit] [-g | --gruppe GROUP] [-s | --skip SKIP] [-x | --skip-gruppe SKIP-GROUP] [ --env ENV] [-f | --fail-schnell] [--no-rebuild] [-] [] []