How To Install php-mock-phpunit2 on Fedora 36
Introduction
In this tutorial we learn how to install php-mock-phpunit2
on Fedora 36.
What is php-mock-phpunit2
Mock built-in PHP functions (e.g. time()) with PHPUnit. This package relies on PHP’s namespace fallback policy. No further extension is needed.
We can use yum
or dnf
to install php-mock-phpunit2
on Fedora 36. In this tutorial we discuss both methods but you only need to choose one of method to install php-mock-phpunit2.
Install php-mock-phpunit2 on Fedora 36 Using dnf
Update yum database with dnf
using the following command.
sudo dnf makecache --refresh
After updating yum database, We can install php-mock-phpunit2
using dnf
by running the following command:
sudo dnf -y install php-mock-phpunit2
Install php-mock-phpunit2 on Fedora 36 Using yum
Update yum database with yum
using the following command.
sudo yum makecache --refresh
After updating yum database, We can install php-mock-phpunit2
using yum
by running the following command:
sudo yum -y install php-mock-phpunit2
How To Uninstall php-mock-phpunit2 on Fedora 36
To uninstall only the php-mock-phpunit2
package we can use the following command:
sudo dnf remove php-mock-phpunit2
php-mock-phpunit2 Package Contents on Fedora 36
/usr/share/doc/php-mock-phpunit2
/usr/share/doc/php-mock-phpunit2/README.md
/usr/share/doc/php-mock-phpunit2/composer.json
/usr/share/licenses/php-mock-phpunit2
/usr/share/licenses/php-mock-phpunit2/LICENSE
/usr/share/php/phpmock2/phpunit
/usr/share/php/phpmock2/phpunit/DefaultArgumentRemoverNoReturnTypes.php
/usr/share/php/phpmock2/phpunit/DefaultArgumentRemoverReturnTypes.php
/usr/share/php/phpmock2/phpunit/DefaultArgumentRemoverReturnTypes84.php
/usr/share/php/phpmock2/phpunit/MockDisablerPHPUnit6.php
/usr/share/php/phpmock2/phpunit/MockDisablerPHPUnit7.php
/usr/share/php/phpmock2/phpunit/MockObjectProxyNoReturnTypes.php
/usr/share/php/phpmock2/phpunit/MockObjectProxyReturnTypes.php
/usr/share/php/phpmock2/phpunit/MockObjectProxyReturnTypes84.php
/usr/share/php/phpmock2/phpunit/PHPMock.php
/usr/share/php/phpmock2/phpunit/autoload.php
/usr/share/php/phpmock2/phpunit/compatibility
/usr/share/php/phpmock2/phpunit/compatibility.php
/usr/share/php/phpmock2/phpunit/compatibility/BaseTestListener.php
References
Summary
In this tutorial we learn how to install php-mock-phpunit2
on Fedora 36 using yum and [dnf]((/fedora/36/dnf/).