Remove unneeded Windows logic

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
This commit is contained in:
Morris Jobke 2016-09-01 10:47:57 +02:00
parent b718693842
commit 3f457943b0
No known key found for this signature in database
GPG Key ID: 9CE5ED29E7FCD38A
2 changed files with 0 additions and 32 deletions

View File

@ -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.
*

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
*/