File tree 1 file changed +25
-0
lines changed
1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change 99
99
expect (DbDumperFactory::createFromConnection ('pgsql ' ))->toBeInstanceOf (PostgreSql::class);
100
100
});
101
101
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
+
102
127
it ('will use the read db when one is defined ' , function () {
103
128
$ dbConfig = [
104
129
'driver ' => 'mysql ' ,
You can’t perform that action at this time.
0 commit comments