summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2016-09-01 14:02:04 +0200
committerGitHub <noreply@github.com>2016-09-01 14:02:04 +0200
commitd3f82356bbbcfa6cc898e2a37a4908bf0f94dfe2 (patch)
tree4eb0b290d6c8ee925312485de6e3287effa683fd
parentbd170a370cd65d22a9a9cc86beeb6a52ef0a39aa (diff)
parent56b58b00b74271623a014eca175f3a0d401ed918 (diff)
downloadnextcloud-server-d3f82356bbbcfa6cc898e2a37a4908bf0f94dfe2.tar.gz
nextcloud-server-d3f82356bbbcfa6cc898e2a37a4908bf0f94dfe2.zip
Merge pull request #1227 from nextcloud/improve-tests
Improve tests
-rw-r--r--.drone.yml2
-rw-r--r--lib/private/LargeFileHelper.php17
-rw-r--r--tests/lib/LargeFileHelperGetFileSizeTest.php15
3 files changed, 1 insertions, 33 deletions
diff --git a/.drone.yml b/.drone.yml
index bbeb85df927..70c5f246a6a 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -4,7 +4,7 @@ build:
commands:
- ./autotest-js.sh
nodb-php5.6:
- image: nextcloudci/php5.6:1.0.6
+ image: nextcloudci/php5.6:php5.6-1
commands:
- rm -rf data/* config/config.php # TODO: remove this - temporary fix for CI issues
- git submodule update --init
diff --git a/lib/private/LargeFileHelper.php b/lib/private/LargeFileHelper.php
index f89d3216a39..9d0fe864033 100644
--- a/lib/private/LargeFileHelper.php
+++ b/lib/private/LargeFileHelper.php
@@ -138,23 +138,6 @@ class LargeFileHelper {
}
/**
- * @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.
*
* @param string $filename Path to the file.
diff --git a/tests/lib/LargeFileHelperGetFileSizeTest.php b/tests/lib/LargeFileHelperGetFileSizeTest.php
index 0c3a11e971a..b2735d7f619 100644
--- a/tests/lib/LargeFileHelperGetFileSizeTest.php
+++ b/tests/lib/LargeFileHelperGetFileSizeTest.php
@@ -57,21 +57,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
- */
public function testGetFileSizeViaExec($filename, $fileSize) {
if (!\OC_Helper::is_function_enabled('exec')) {
$this->markTestSkipped(