@@ -86,7 +86,7 @@ public function it_can_add_named_options_to_the_dump_command()
8686
8787 $ this ->app ['config ' ]->set ('database.connections.mysql.dump ' , $ dumpConfig );
8888
89- $ this ->assertContains ('--single-transaction ' , $ this ->getDumpCommand ());
89+ $ this ->assertContains ('--single-transaction ' , $ this ->getDumpCommand (' mysql ' ));
9090 }
9191
9292 /** @test */
@@ -96,7 +96,7 @@ public function it_can_add_named_options_with_an_array_value_to_the_dump_command
9696
9797 $ this ->app ['config ' ]->set ('database.connections.mysql.dump ' , $ dumpConfig );
9898
99- $ this ->assertContains (implode (' ' , $ dumpConfig ['include_tables ' ]), $ this ->getDumpCommand ());
99+ $ this ->assertContains (implode (' ' , $ dumpConfig ['include_tables ' ]), $ this ->getDumpCommand (' mysql ' ));
100100 }
101101
102102 /** @test */
@@ -106,14 +106,20 @@ public function it_can_add_arbritrary_options_to_the_dump_command()
106106
107107 $ this ->app ['config ' ]->set ('database.connections.mysql.dump ' , $ dumpConfig );
108108
109- $ this ->assertContains ($ dumpConfig ['add_extra_option ' ], $ this ->getDumpCommand ());
109+ $ this ->assertContains ($ dumpConfig ['add_extra_option ' ], $ this ->getDumpCommand (' mysql ' ));
110110 }
111111
112- protected function getDumpCommand (): string
112+ /** @test */
113+ public function it_adds_the_inserts_option_to_the_pgsql_dump_command ()
114+ {
115+ $ this ->assertContains ('--inserts ' , $ this ->getDumpCommand ('pgsql ' ));
116+ }
117+
118+ protected function getDumpCommand (string $ connectionName ): string
113119 {
114120 $ dumpFile = '' ;
115121 $ credentialsFile = '' ;
116122
117- return DbDumperFactory::createForConnection (' mysql ' )->getDumpCommand ($ dumpFile , $ credentialsFile );
123+ return DbDumperFactory::createForConnection ($ connectionName )->getDumpCommand ($ dumpFile , $ credentialsFile );
118124 }
119125}
0 commit comments