phar-io / composer-distributor

Distribute PHAR files via Composer
Other
12 stars 2 forks source link

Switched all integration tests to xml config #11

Closed sebastianfeldmann closed 3 years ago

sebastianfeldmann commented 3 years ago

I changed the abstract method from getMediatorConfig to getDistributorConfig since we renamed the file from mediator.xml to distributor.xml I thought this would make sense.

On the other hand I fixed the integration tests by changing all test assets from json to xml

sebastianfeldmann commented 3 years ago

BTW integration tests ar still not a 100% on my side

Runtime:       PHP 7.4.12
Configuration: /phar-io/composer-distributor/phpunit.xml

..................EF                                              20 / 20 (100%)

Time: 00:03.966, Memory: 22.00 MB

There was 1 error:

1) PharIo\ComposerDistributorTest\InstallationTest::testInstallationWithSignatureWorks
TypeError: Return value of PharIo\GnuPG\Factory::createGnuPG() must be an instance of GnuPG, instance of PharIo\GnuPG\GnuPG returned

/phar-io/composer-distributor/vendor/phar-io/gnupg/src/Factory.php:45
/phar-io/composer-distributor/src/Service/Installer.php:124
/phar-io/composer-distributor/src/Service/Installer.php:81
/phar-io/composer-distributor/src/ConfiguredMediator.php:30
/phar-io/composer-distributor/tests/integration/InstallationTest.php:81

--

There was 1 failure:

1) PharIo\ComposerDistributorTest\InstallationTest::testInstallationWithFaultySignatureFails
Failed asserting that exception of type "TypeError" matches expected exception "Exception". Message was: "Return value of PharIo\GnuPG\Factory::createGnuPG() must be an instance of GnuPG, instance of PharIo\GnuPG\GnuPG returned" at
/phar-io/composer-distributor/vendor/phar-io/gnupg/src/Factory.php:45
/phar-io/composer-distributor/src/Service/Installer.php:124
/phar-io/composer-distributor/src/Service/Installer.php:81
/phar-io/composer-distributor/src/ConfiguredMediator.php:30
/phar-io/composer-distributor/tests/integration/InstallationTest.php:115
theseer commented 3 years ago

BTW integration tests ar still not a 100% on my side

There was 1 error:

1) PharIo\ComposerDistributorTest\InstallationTest::testInstallationWithSignatureWorks TypeError: Return value of PharIo\GnuPG\Factory::createGnuPG() must be an instance of GnuPG, instance of PharIo\GnuPG\GnuPG returned

This likely is an issue with \class_alias detection. Our shim factory uses class_alias for GnuPG to be a true drop-in alternative to ext/gnupg but still be in its own namespace "officially" and when not used through our factory - which technically should be probably be named locator..