mirror of
https://github.com/Combodo/iTop.git
synced 2026-06-20 23:06:37 +02:00
Compare commits
3 Commits
feature/96
...
support/3.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1d9e7f9b55 | ||
|
|
ff2357473b | ||
|
|
9a93bcb06f |
483
tests/php-code-style/composer.lock
generated
483
tests/php-code-style/composer.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -391,6 +391,10 @@ EOF
|
||||
}
|
||||
|
||||
/**
|
||||
* Note: This test is not optimal!
|
||||
* It checks if a dict entry is present in the same file but *accross different `Dict::Add()` sections*.
|
||||
* If the dict entry is present multiple times within the same `Dict::Add()` section, it won't be detected as the test evaluates the PHP files which deduplicate the hash array, making the algorythm unaccurate.
|
||||
*
|
||||
* @dataProvider DictionaryFileProvider
|
||||
*/
|
||||
public function testDictKeyDefinedOncePerFile(string $sDictFileToTestFullPath): void
|
||||
@@ -409,6 +413,10 @@ EOF
|
||||
}
|
||||
|
||||
/**
|
||||
* Note: This test is not optimal!
|
||||
* It checks if a dict entry is present in the same file but *accross different `Dict::Add()` sections*.
|
||||
* If the dict entry is present multiple times within the same `Dict::Add()` section, it won't be detected as the test evaluates the PHP files which deduplicate the hash array, making the algorythm unaccurate.
|
||||
*
|
||||
* @dataProvider GetLanguagesData
|
||||
*
|
||||
* @param string $sLang
|
||||
|
||||
@@ -895,8 +895,16 @@ HTML,
|
||||
|
||||
public function testFileGetContentsAndMIMETypeOnLocalURL()
|
||||
{
|
||||
$sURL = utils::GetAbsoluteUrlAppRoot().'env-production/itop-request-mgmt/images/user-request.svg';
|
||||
$sPath = APPROOT.'env-production/itop-request-mgmt/images/user-request.svg';
|
||||
// For the test to work on most dev / CI environments, we need to use a module with an SVG image that is installed with the current setup choices
|
||||
if (file_exists(APPROOT.'env-production/itop-request-mgmt/images/user-request.svg')) {
|
||||
$sImgRelPath = 'itop-request-mgmt/images/user-request.svg';
|
||||
} elseif (file_exists(APPROOT.'env-production/itop-request-mgmt-itil/images/user-request.svg')) {
|
||||
$sImgRelPath = 'itop-request-mgmt-itil/images/user-request.svg';
|
||||
}
|
||||
|
||||
$sURL = utils::GetAbsoluteUrlModulesRoot().$sImgRelPath;
|
||||
$sPath = APPROOT.'env-production/'.$sImgRelPath;
|
||||
|
||||
$oExpectedDocument = new ormDocument(file_get_contents($sPath), 'image/svg+xml; charset=us-ascii', 'user-request.svg');
|
||||
$this->assertEquals($oExpectedDocument, utils::FileGetContentsAndMIMEType($sURL));
|
||||
// Read local URL directly on disk
|
||||
|
||||
Reference in New Issue
Block a user