Merge pull request #1227 from nextcloud/improve-tests

Improve tests
This commit is contained in:
Joas Schilling 2016-09-01 14:02:04 +02:00 committed by GitHub
commit d3f82356bb
3 changed files with 1 additions and 33 deletions

View File

@ -4,7 +4,7 @@ build:
commands: commands:
- ./autotest-js.sh - ./autotest-js.sh
nodb-php5.6: nodb-php5.6:
image: nextcloudci/php5.6:1.0.6 image: nextcloudci/php5.6:php5.6-1
commands: commands:
- rm -rf data/* config/config.php # TODO: remove this - temporary fix for CI issues - rm -rf data/* config/config.php # TODO: remove this - temporary fix for CI issues
- git submodule update --init - git submodule update --init

View File

@ -137,23 +137,6 @@ class LargeFileHelper {
return null; return null;
} }
/**
* @brief Tries to get the size of a file via the Windows DOM extension.
*
* @param string $filename Path to the file.
*
* @return null|int|float Number of bytes as number (float or int) or
* null on failure.
*/
public function getFileSizeViaCOM($filename) {
if (class_exists('COM')) {
$fsObj = new \COM("Scripting.FileSystemObject");
$file = $fsObj->GetFile($filename);
return 0 + $file->Size;
}
return null;
}
/** /**
* @brief Tries to get the size of a file via an exec() call. * @brief Tries to get the size of a file via an exec() call.
* *

View File

@ -54,21 +54,6 @@ class LargeFileHelperGetFileSizeTest extends TestCase {
); );
} }
/**
* @dataProvider dataFileNameProvider
*/
public function testGetFileSizeViaCOM($filename, $fileSize) {
if (!extension_loaded('COM')) {
$this->markTestSkipped(
'The PHP Windows COM extension is required for this test.'
);
}
$this->assertSame(
$fileSize,
$this->helper->getFileSizeViaCOM($filename)
);
}
/** /**
* @dataProvider dataFileNameProvider * @dataProvider dataFileNameProvider
*/ */