-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Allow for DropboxV2 * Fixed broken tests * Make exception for lower versions of PHPUnit
- Loading branch information
Showing
7 changed files
with
44 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -66,4 +66,4 @@ install: | |
|
||
script: | ||
- composer validate --strict --no-check-lock | ||
# - $TEST_COMMAND | ||
- $TEST_COMMAND |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,11 @@ | ||
# Changelog | ||
|
||
## 2.1.3 | ||
|
||
### Fixed | ||
|
||
- Fixed bug that made DropboxV2 config unavailable. | ||
|
||
## 2.1.2 | ||
|
||
### Fixed | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,38 +33,6 @@ public function testReplacementOfConfig() | |
$this->assertContainerBuilderHasServiceDefinitionWithArgument('backup_manager.config_database', 0, $dbConfig); | ||
} | ||
|
||
public function testDsn() | ||
{ | ||
$storageConfig = ['local'=>['type'=>'Local', 'root'=>'/foo']]; | ||
$dbConfig = ['dev'=>[ | ||
'type'=>'mysql', | ||
'host'=>'host.com', | ||
'port'=>'3306', | ||
'user'=>'user', | ||
'pass'=>'pass', | ||
'database'=>'db', | ||
// The DSN should override them all. | ||
'dsn'=>'pgsql://root:[email protected]:5432/test_db', | ||
]]; | ||
|
||
$this->load([ | ||
'storage' => $storageConfig, | ||
'database' => $dbConfig, | ||
]); | ||
|
||
$parsedConfig = ['dev'=>[ | ||
'type'=>'pgsql', | ||
'host'=>'127.0.0.1', | ||
'port'=>'5432', | ||
'user'=>'root', | ||
'pass'=>'root_pass', | ||
'database'=>'test_db', | ||
]]; | ||
|
||
$this->assertContainerBuilderHasServiceDefinitionWithArgument('backup_manager.config_storage', 0, $storageConfig); | ||
$this->assertContainerBuilderHasServiceDefinitionWithArgument('backup_manager.config_database', 0, $parsedConfig); | ||
} | ||
|
||
/** | ||
* Make sure we can have multiple storage names with the same type | ||
*/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -135,32 +135,48 @@ public function testSingleTransactionOnValid() | |
); | ||
} | ||
|
||
public function testDsn() | ||
public function testNoType() | ||
{ | ||
$this->assertConfigurationIsInvalid(array( | ||
[ | ||
'database'=>[ | ||
'dev'=>[ | ||
'dsn' => 'pgsql://root:[email protected]:5432/test_db', | ||
'singleTransaction' => true, | ||
|
||
], | ||
], | ||
] | ||
) | ||
), | ||
'You must define a "type" or "dsn" for database "dev"' | ||
); | ||
} | ||
public function testNoType() | ||
|
||
/** | ||
* | ||
* @dataProvider validStorageTypes | ||
*/ | ||
public function testStorageTypes($type) | ||
{ | ||
$this->assertConfigurationIsInvalid(array( | ||
$this->assertConfigurationIsValid(array( | ||
[ | ||
'database'=>[ | ||
'dev'=>[ | ||
|
||
'type' => 'mysql' | ||
], | ||
], | ||
'storage' => [ | ||
'foo' => [ | ||
'type' => $type, | ||
] | ||
] | ||
] | ||
), | ||
'You must define a "type" or "dsn" for database "dev"' | ||
) | ||
); | ||
} | ||
|
||
public function validStorageTypes() | ||
{ | ||
return [ | ||
['Local'],['AwsS3'], ['Rackspace'], ['Dropbox'], ['DropboxV2'], ['Ftp'], ['Sftp'], | ||
]; | ||
} | ||
} |