Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
sreichel committed Dec 16, 2024
1 parent b3fe74b commit 8f9bd82
Showing 1 changed file with 7 additions and 14 deletions.
21 changes: 7 additions & 14 deletions tests/N98/Magento/Command/Database/DumpCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,20 +50,13 @@ public function testExecute()
*/
public function provideFilenamePatternsAndOptions(): \Iterator
{
# testAddTimeAutogenerated
yield ['/^.*\d{4}-\d{2}-\d{2}_\d{6}\.sql$/', []];
# testAddTimePrefixAutogenerated
yield ['/^\d{4}-\d{2}-\d{2}_\d{6}.*\.sql$/', ['--add-time' => 'prefix']];
# testAddTimeFilenameSpecified
yield ['/^.*\d{4}-\d{2}-\d{2}_\d{6}\.sql.gz$/', ['--compression' => 'gzip']];
# testAddTimeFilenameSpecified
yield ['/^foo_\d{4}-\d{2}-\d{2}_\d{6}\.sql$/', ['filename' => 'foo.sql']];
# testAddTimePrefixFilenameSpecified
yield ['/^\d{4}-\d{2}-\d{2}_\d{6}_foo\.sql$/', ['filename' => 'foo.sql', '--add-time' => 'prefix']];
# testAddTimeOffFilenameSpecified
yield ['/^foo.sql$/', ['filename' => 'foo.sql', '--add-time' => 'no']];
# testAddTimeFilenameSpecifiedRelative
yield ['/^..\/foo_\d{4}-\d{2}-\d{2}_\d{6}\.sql$/', ['filename' => '../foo.sql']];
yield 'testAddTimeAutogenerated' => ['/^.*\d{4}-\d{2}-\d{2}_\d{6}\.sql$/', []];
yield 'testAddTimePrefixAutogenerated' => ['/^\d{4}-\d{2}-\d{2}_\d{6}.*\.sql$/', ['--add-time' => 'prefix']];
yield 'testAddTimeFilenameSpecified' => ['/^.*\d{4}-\d{2}-\d{2}_\d{6}\.sql.gz$/', ['--compression' => 'gzip']];
yield 'testAddTimeFilenameSpecified' => ['/^foo_\d{4}-\d{2}-\d{2}_\d{6}\.sql$/', ['filename' => 'foo.sql']];
yield 'testAddTimePrefixFilenameSpecified' => ['/^\d{4}-\d{2}-\d{2}_\d{6}_foo\.sql$/', ['filename' => 'foo.sql', '--add-time' => 'prefix']];
yield 'testAddTimeOffFilenameSpecified' => ['/^foo.sql$/', ['filename' => 'foo.sql', '--add-time' => 'no']];
yield 'testAddTimeFilenameSpecifiedRelative' => ['/^..\/foo_\d{4}-\d{2}-\d{2}_\d{6}\.sql$/', ['filename' => '../foo.sql']];
}

/**
Expand Down

0 comments on commit 8f9bd82

Please sign in to comment.