From a3c1d748297e50b18baeaead159197db275370fa Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Thu, 1 Sep 2016 10:47:57 +0200 Subject: [PATCH 1/2] Remove unneeded Windows logic --- lib/private/LargeFileHelper.php | 17 ----------------- tests/lib/LargeFileHelperGetFileSizeTest.php | 15 --------------- 2 files changed, 32 deletions(-) diff --git a/lib/private/LargeFileHelper.php b/lib/private/LargeFileHelper.php index f89d3216a3..9d0fe86403 100644 --- a/lib/private/LargeFileHelper.php +++ b/lib/private/LargeFileHelper.php @@ -137,23 +137,6 @@ class LargeFileHelper { 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. * diff --git a/tests/lib/LargeFileHelperGetFileSizeTest.php b/tests/lib/LargeFileHelperGetFileSizeTest.php index 0c3a11e971..b2735d7f61 100644 --- a/tests/lib/LargeFileHelperGetFileSizeTest.php +++ b/tests/lib/LargeFileHelperGetFileSizeTest.php @@ -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 */ From 56b58b00b74271623a014eca175f3a0d401ed918 Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Thu, 1 Sep 2016 10:48:30 +0200 Subject: [PATCH 2/2] properly load APCu extension on CLI to execute APCu tests --- .drone.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 6016ebd698..0ae277cda2 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