我是Codeception中的新手,试图在Codeception中进行数据库测试,但出现错误:“ Db:创建PDO连接时数据源名称无效”。我应该做什么配置?
我试图在accept.suite.yml中进行配置
actor: AcceptanceTester
modules:
enabled:
- PhpBrowser:
url: http://localhost/affiliate_codeception/login
- \Helper\Acceptance
- Db
step_decorators: ~
在codeception.yml中
paths:
tests: tests
output: tests/_output
data: tests/_data
support: tests/_support
envs: tests/_envs
actor_suffix: Tester
extensions:
enabled:
- Codeception\Extension\RunFailed
modules:
config:
Db:
dsn:'mysql:host=localhost;dbname=testdb'
user:'root'
password:'root'
dump:tests/_data/dump.sql