owncloud / testing

🔧 app for testing ownCloud
GNU Affero General Public License v3.0
3 stars 4 forks source link

Add endpoint for getExtension from MimeType #79

Closed paurakhsharma closed 5 years ago

paurakhsharma commented 5 years ago

Description

Add an endpoint to getExtenstion from Mime type. Acceptance tests in firewall app require to get the extension based on the given mimetype. Which requires to load Config.php which makes it difficult to run acceptance tests through make command without sudo. So, this PR solves the issue.

Related Issue

https://github.com/owncloud/QA/issues/605

How Has This Been Tested?

:robot:

Types of changes

Checklist:

phil-davis commented 5 years ago

@paurakhsharma are there tests we can add for this endpoint? We can merge this and put tests in a separate issue if you like, so that this new endpoint gets in the QA tarball tonight.

phil-davis commented 5 years ago

@paurakhsharma phan does not like it: https://drone.owncloud.com/owncloud/testing/272/30

hp -d zend.enable_gc=0 vendor-bin/phan/vendor/bin/phan --config-file .phan/config.php --require-config-exists
lib/Config.php:164 PhanUndeclaredMethod Call to undeclared method \OCP\Files\IMimeTypeDetector::getAllMappings
lib/Config.php:184 PhanUndeclaredMethod Call to undeclared method \OCP\Files\IMimeTypeDetector::getAllMappings
make: *** [test-php-phan] Error 1
Makefile:74: recipe for target 'test-php-phan' failed
phil-davis commented 5 years ago

The code analyzers don't like:

php -d zend.enable_gc=0 vendor-bin/phan/vendor/bin/phan --config-file .phan/config.php --require-config-exists
lib/Config.php:164 PhanUndeclaredMethod Call to undeclared method \OCP\Files\IMimeTypeDetector::getAllMappings
lib/Config.php:184 PhanUndeclaredMethod Call to undeclared method \OCP\Files\IMimeTypeDetector::getAllMappings
Makefile:74: recipe for target 'test-php-phan' failed

https://drone.owncloud.com/owncloud/testing/278/36

Why is that?

paurakhsharma commented 5 years ago

php-phan still seems to be unhappy :(

phil-davis commented 5 years ago

php-phan still seems to be unhappy :(

@paurakhsharma when you work out how to make it happy again, please give us all some education/training

phil-davis commented 5 years ago

I did the "Publish latest version as github release" bit in https://github.com/owncloud/testing/blob/master/README.md