php - Codeception - pointing DB to MAMP MySQL server -
is there way point db module functional tests in codeception mamp mysql server rather built in server?
class_name: testguy modules: enabled: [db, filesystem, testhelper] config: db: dsn: 'mysql:host=localhost;dbname=testdb' user: 'root' password: 'root' dump: 'tests/_data/dump.sql' populate: true cleanup: false
codeception uses pdo connect database. pass "dsn" string straight pdo constructor. thus, according http://www.php.net//manual/en/ref.pdo-mysql.connection.php, configuration should following in order connect mamp mysql server running on port 8889:
class_name: testguy modules: enabled: [db, filesystem, testhelper] config: db: dsn: 'mysql:host=localhost;port=8889;dbname=testdb' user: 'root' password: 'root' dump: 'tests/_data/dump.sql' populate: true cleanup: false
Comments
Post a Comment