How To Install php-phpunit-PHPUnit on Fedora 36

In this tutorial we learn how to install php-phpunit-PHPUnit in Fedora 36. php-phpunit-PHPUnit is The PHP Unit Testing framework version 5

Introduction

In this tutorial we learn how to install php-phpunit-PHPUnit on Fedora 36.

What is php-phpunit-PHPUnit

PHPUnit is a family of PEAR packages that supports the development of object-oriented PHP applications using the concepts and methods of Agile Software Development, Extreme Programming, Test-Driven Development and Design-by-Contract Development by providing an elegant and robust framework for the creation, execution and analysis of Unit Tests. This package provides the version 5 of PHPUnit, available using the phpunit command. This version have reached its end of life in Feb 2018, so consider using a supported version, see https Documentation

We can use yum or dnf to install php-phpunit-PHPUnit on Fedora 36. In this tutorial we discuss both methods but you only need to choose one of method to install php-phpunit-PHPUnit.

Install php-phpunit-PHPUnit 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-phpunit-PHPUnit using dnf by running the following command:

sudo dnf -y install php-phpunit-PHPUnit

Install php-phpunit-PHPUnit 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-phpunit-PHPUnit using yum by running the following command:

sudo yum -y install php-phpunit-PHPUnit

How To Uninstall php-phpunit-PHPUnit on Fedora 36

To uninstall only the php-phpunit-PHPUnit package we can use the following command:

sudo dnf remove php-phpunit-PHPUnit

php-phpunit-PHPUnit Package Contents on Fedora 36

/usr/bin/phpunit
/usr/share/doc/php-phpunit-PHPUnit
/usr/share/doc/php-phpunit-PHPUnit/ChangeLog-5.7.md
/usr/share/doc/php-phpunit-PHPUnit/README.md
/usr/share/doc/php-phpunit-PHPUnit/composer.json
/usr/share/licenses/php-phpunit-PHPUnit
/usr/share/licenses/php-phpunit-PHPUnit/LICENSE
/usr/share/php/PHPUnit
/usr/share/php/PHPUnit/Autoload.php
/usr/share/php/PHPUnit/Exception.php
/usr/share/php/PHPUnit/Extensions
/usr/share/php/PHPUnit/Extensions/GroupTestSuite.php
/usr/share/php/PHPUnit/Extensions/PhptTestCase.php
/usr/share/php/PHPUnit/Extensions/PhptTestSuite.php
/usr/share/php/PHPUnit/Extensions/RepeatedTest.php
/usr/share/php/PHPUnit/Extensions/TestDecorator.php
/usr/share/php/PHPUnit/Extensions/TicketListener.php
/usr/share/php/PHPUnit/ForwardCompatibility
/usr/share/php/PHPUnit/ForwardCompatibility/Assert.php
/usr/share/php/PHPUnit/ForwardCompatibility/AssertionFailedError.php
/usr/share/php/PHPUnit/ForwardCompatibility/BaseTestListener.php
/usr/share/php/PHPUnit/ForwardCompatibility/Test.php
/usr/share/php/PHPUnit/ForwardCompatibility/TestCase.php
/usr/share/php/PHPUnit/ForwardCompatibility/TestListener.php
/usr/share/php/PHPUnit/ForwardCompatibility/TestSuite.php
/usr/share/php/PHPUnit/Framework
/usr/share/php/PHPUnit/Framework/Assert
/usr/share/php/PHPUnit/Framework/Assert.php
/usr/share/php/PHPUnit/Framework/Assert/Functions.php
/usr/share/php/PHPUnit/Framework/AssertionFailedError.php
/usr/share/php/PHPUnit/Framework/BaseTestListener.php
/usr/share/php/PHPUnit/Framework/CodeCoverageException.php
/usr/share/php/PHPUnit/Framework/Constraint
/usr/share/php/PHPUnit/Framework/Constraint.php
/usr/share/php/PHPUnit/Framework/Constraint/And.php
/usr/share/php/PHPUnit/Framework/Constraint/ArrayHasKey.php
/usr/share/php/PHPUnit/Framework/Constraint/ArraySubset.php
/usr/share/php/PHPUnit/Framework/Constraint/Attribute.php
/usr/share/php/PHPUnit/Framework/Constraint/Callback.php
/usr/share/php/PHPUnit/Framework/Constraint/ClassHasAttribute.php
/usr/share/php/PHPUnit/Framework/Constraint/ClassHasStaticAttribute.php
/usr/share/php/PHPUnit/Framework/Constraint/Composite.php
/usr/share/php/PHPUnit/Framework/Constraint/Count.php
/usr/share/php/PHPUnit/Framework/Constraint/DirectoryExists.php
/usr/share/php/PHPUnit/Framework/Constraint/Exception.php
/usr/share/php/PHPUnit/Framework/Constraint/ExceptionCode.php
/usr/share/php/PHPUnit/Framework/Constraint/ExceptionMessage.php
/usr/share/php/PHPUnit/Framework/Constraint/ExceptionMessageRegExp.php
/usr/share/php/PHPUnit/Framework/Constraint/FileExists.php
/usr/share/php/PHPUnit/Framework/Constraint/GreaterThan.php
/usr/share/php/PHPUnit/Framework/Constraint/IsAnything.php
/usr/share/php/PHPUnit/Framework/Constraint/IsEmpty.php
/usr/share/php/PHPUnit/Framework/Constraint/IsEqual.php
/usr/share/php/PHPUnit/Framework/Constraint/IsFalse.php
/usr/share/php/PHPUnit/Framework/Constraint/IsFinite.php
/usr/share/php/PHPUnit/Framework/Constraint/IsIdentical.php
/usr/share/php/PHPUnit/Framework/Constraint/IsInfinite.php
/usr/share/php/PHPUnit/Framework/Constraint/IsInstanceOf.php
/usr/share/php/PHPUnit/Framework/Constraint/IsJson.php
/usr/share/php/PHPUnit/Framework/Constraint/IsNan.php
/usr/share/php/PHPUnit/Framework/Constraint/IsNull.php
/usr/share/php/PHPUnit/Framework/Constraint/IsReadable.php
/usr/share/php/PHPUnit/Framework/Constraint/IsTrue.php
/usr/share/php/PHPUnit/Framework/Constraint/IsType.php
/usr/share/php/PHPUnit/Framework/Constraint/IsWritable.php
/usr/share/php/PHPUnit/Framework/Constraint/JsonMatches
/usr/share/php/PHPUnit/Framework/Constraint/JsonMatches.php
/usr/share/php/PHPUnit/Framework/Constraint/JsonMatches/ErrorMessageProvider.php
/usr/share/php/PHPUnit/Framework/Constraint/LessThan.php
/usr/share/php/PHPUnit/Framework/Constraint/Not.php
/usr/share/php/PHPUnit/Framework/Constraint/ObjectHasAttribute.php
/usr/share/php/PHPUnit/Framework/Constraint/Or.php
/usr/share/php/PHPUnit/Framework/Constraint/PCREMatch.php
/usr/share/php/PHPUnit/Framework/Constraint/SameSize.php
/usr/share/php/PHPUnit/Framework/Constraint/StringContains.php
/usr/share/php/PHPUnit/Framework/Constraint/StringEndsWith.php
/usr/share/php/PHPUnit/Framework/Constraint/StringMatches.php
/usr/share/php/PHPUnit/Framework/Constraint/StringStartsWith.php
/usr/share/php/PHPUnit/Framework/Constraint/TraversableContains.php
/usr/share/php/PHPUnit/Framework/Constraint/TraversableContainsOnly.php
/usr/share/php/PHPUnit/Framework/Constraint/Xor.php
/usr/share/php/PHPUnit/Framework/CoveredCodeNotExecutedException.php
/usr/share/php/PHPUnit/Framework/Error
/usr/share/php/PHPUnit/Framework/Error.php
/usr/share/php/PHPUnit/Framework/Error/Deprecated.php
/usr/share/php/PHPUnit/Framework/Error/Notice.php
/usr/share/php/PHPUnit/Framework/Error/Warning.php
/usr/share/php/PHPUnit/Framework/Exception.php
/usr/share/php/PHPUnit/Framework/ExceptionWrapper.php
/usr/share/php/PHPUnit/Framework/ExpectationFailedException.php
/usr/share/php/PHPUnit/Framework/IncompleteTest.php
/usr/share/php/PHPUnit/Framework/IncompleteTestCase.php
/usr/share/php/PHPUnit/Framework/IncompleteTestError.php
/usr/share/php/PHPUnit/Framework/InvalidCoversTargetException.php
/usr/share/php/PHPUnit/Framework/MissingCoversAnnotationException.php
/usr/share/php/PHPUnit/Framework/OutputError.php
/usr/share/php/PHPUnit/Framework/RiskyTest.php
/usr/share/php/PHPUnit/Framework/RiskyTestError.php
/usr/share/php/PHPUnit/Framework/SelfDescribing.php
/usr/share/php/PHPUnit/Framework/SkippedTest.php
/usr/share/php/PHPUnit/Framework/SkippedTestCase.php
/usr/share/php/PHPUnit/Framework/SkippedTestError.php
/usr/share/php/PHPUnit/Framework/SkippedTestSuiteError.php
/usr/share/php/PHPUnit/Framework/SyntheticError.php
/usr/share/php/PHPUnit/Framework/Test.php
/usr/share/php/PHPUnit/Framework/TestCase.php
/usr/share/php/PHPUnit/Framework/TestFailure.php
/usr/share/php/PHPUnit/Framework/TestListener.php
/usr/share/php/PHPUnit/Framework/TestResult.php
/usr/share/php/PHPUnit/Framework/TestSuite
/usr/share/php/PHPUnit/Framework/TestSuite.php
/usr/share/php/PHPUnit/Framework/TestSuite/DataProvider.php
/usr/share/php/PHPUnit/Framework/UnintentionallyCoveredCodeError.php
/usr/share/php/PHPUnit/Framework/Warning.php
/usr/share/php/PHPUnit/Framework/WarningTestCase.php
/usr/share/php/PHPUnit/Runner
/usr/share/php/PHPUnit/Runner/BaseTestRunner.php
/usr/share/php/PHPUnit/Runner/Exception.php
/usr/share/php/PHPUnit/Runner/Filter
/usr/share/php/PHPUnit/Runner/Filter/Factory.php
/usr/share/php/PHPUnit/Runner/Filter/Group
/usr/share/php/PHPUnit/Runner/Filter/Group.php
/usr/share/php/PHPUnit/Runner/Filter/Group/Exclude.php
/usr/share/php/PHPUnit/Runner/Filter/Group/Include.php
/usr/share/php/PHPUnit/Runner/Filter/Test.php
/usr/share/php/PHPUnit/Runner/StandardTestSuiteLoader.php
/usr/share/php/PHPUnit/Runner/TestSuiteLoader.php
/usr/share/php/PHPUnit/Runner/Version.php
/usr/share/php/PHPUnit/TextUI
/usr/share/php/PHPUnit/TextUI/Command.php
/usr/share/php/PHPUnit/TextUI/ResultPrinter.php
/usr/share/php/PHPUnit/TextUI/TestRunner.php
/usr/share/php/PHPUnit/Util
/usr/share/php/PHPUnit/Util/Blacklist.php
/usr/share/php/PHPUnit/Util/Configuration.php
/usr/share/php/PHPUnit/Util/ConfigurationGenerator.php
/usr/share/php/PHPUnit/Util/ErrorHandler.php
/usr/share/php/PHPUnit/Util/Fileloader.php
/usr/share/php/PHPUnit/Util/Filesystem.php
/usr/share/php/PHPUnit/Util/Filter.php
/usr/share/php/PHPUnit/Util/Getopt.php
/usr/share/php/PHPUnit/Util/GlobalState.php
/usr/share/php/PHPUnit/Util/InvalidArgumentHelper.php
/usr/share/php/PHPUnit/Util/Log
/usr/share/php/PHPUnit/Util/Log/JSON.php
/usr/share/php/PHPUnit/Util/Log/JUnit.php
/usr/share/php/PHPUnit/Util/Log/TAP.php
/usr/share/php/PHPUnit/Util/Log/TeamCity.php
/usr/share/php/PHPUnit/Util/PHP
/usr/share/php/PHPUnit/Util/PHP.php
/usr/share/php/PHPUnit/Util/PHP/Default.php
/usr/share/php/PHPUnit/Util/PHP/Template
/usr/share/php/PHPUnit/Util/PHP/Template/TestCaseMethod.tpl.dist
/usr/share/php/PHPUnit/Util/PHP/Windows.php
/usr/share/php/PHPUnit/Util/PHP/eval-stdin.php
/usr/share/php/PHPUnit/Util/Printer.php
/usr/share/php/PHPUnit/Util/Regex.php
/usr/share/php/PHPUnit/Util/String.php
/usr/share/php/PHPUnit/Util/Test.php
/usr/share/php/PHPUnit/Util/TestDox
/usr/share/php/PHPUnit/Util/TestDox/NamePrettifier.php
/usr/share/php/PHPUnit/Util/TestDox/ResultPrinter
/usr/share/php/PHPUnit/Util/TestDox/ResultPrinter.php
/usr/share/php/PHPUnit/Util/TestDox/ResultPrinter/HTML.php
/usr/share/php/PHPUnit/Util/TestDox/ResultPrinter/Text.php
/usr/share/php/PHPUnit/Util/TestDox/ResultPrinter/XML.php
/usr/share/php/PHPUnit/Util/TestSuiteIterator.php
/usr/share/php/PHPUnit/Util/Type.php
/usr/share/php/PHPUnit/Util/XML.php

References

Summary

In this tutorial we learn how to install php-phpunit-PHPUnit on Fedora 36 using yum and [dnf]((/fedora/36/dnf/).