File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change 9999 expect (DbDumperFactory::createFromConnection ('pgsql ' ))->toBeInstanceOf (PostgreSql::class);
100100});
101101
102+ it ('ignores malformed ports ' , function () {
103+ $ dbConfig = [
104+ 'driver ' => 'mysql ' ,
105+ 'read ' => [
106+ 'host ' => 'localhost-read ' ,
107+ 'database ' => 'myDb-read ' ,
108+ 'port ' => ''
109+ ],
110+ 'write ' => [
111+ 'host ' => 'localhost-write ' ,
112+ 'database ' => 'myDb-write ' ,
113+ 'port ' => 'fish '
114+ ],
115+ 'username ' => 'root ' ,
116+ 'password ' => 'myPassword ' ,
117+ 'dump ' => ['add_extra_option ' => '--extra-option=value ' ],
118+ ];
119+
120+ config ()->set ('database.connections.mysql ' , $ dbConfig );
121+
122+ $ dumper = DbDumperFactory::createFromConnection ('mysql ' );
123+
124+ expect ($ dumper ->getPort ())->toEqual (null );
125+ });
126+
102127it ('will use the read db when one is defined ' , function () {
103128 $ dbConfig = [
104129 'driver ' => 'mysql ' ,
You can’t perform that action at this time.
0 commit comments