How To Install phpunit8 on Fedora 34

phpunit8 is The PHP Unit Testing framework version 8

Introduction

In this tutorial we learn how to install phpunit8 on Fedora 34.

What is phpunit8

PHPUnit is a programmer-oriented testing framework for PHP. It is an instance of the xUnit architecture for unit testing frameworks. This package provides the version 8 of PHPUnit, available using the phpunit8 command. Documentation

We can use yum or dnf to install phpunit8 on Fedora 34. In this tutorial we discuss both methods but you only need to choose one of method to install phpunit8.

Install phpunit8 on Fedora 34 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

The output should look something like this:

Fedora 34 - x86_64                               20 kB/s | 6.6 kB     00:00
Fedora 34 openh264 (From Cisco) - x86_64        1.4 kB/s | 989  B     00:00
Fedora Modular 34 - x86_64                       68 kB/s | 6.5 kB     00:00
Fedora 34 - x86_64 - Updates                    3.5 kB/s | 6.2 kB     00:01
Fedora Modular 34 - x86_64 - Updates             17 kB/s | 5.9 kB     00:00
Metadata cache created.

After updating yum database, We can install phpunit8 using dnf by running the following command:

sudo dnf -y install phpunit8

Install phpunit8 on Fedora 34 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

The output should look something like this:

Fedora 34 - x86_64                               20 kB/s | 6.6 kB     00:00
Fedora 34 openh264 (From Cisco) - x86_64        1.4 kB/s | 989  B     00:00
Fedora Modular 34 - x86_64                       68 kB/s | 6.5 kB     00:00
Fedora 34 - x86_64 - Updates                    3.5 kB/s | 6.2 kB     00:01
Fedora Modular 34 - x86_64 - Updates             17 kB/s | 5.9 kB     00:00
Metadata cache created.

After updating yum database, We can install phpunit8 using yum by running the following command:

sudo yum -y install phpunit8

How To Uninstall phpunit8 on Fedora 34

To uninstall only the phpunit8 package we can use the following command:

sudo dnf remove phpunit8

phpunit8 Package Contents on Fedora 34

/usr/bin/phpunit8
/usr/share/doc/phpunit8
/usr/share/doc/phpunit8/ChangeLog-8.5.md
/usr/share/doc/phpunit8/README.md
/usr/share/doc/phpunit8/composer.json
/usr/share/licenses/phpunit8
/usr/share/licenses/phpunit8/LICENSE
/usr/share/php/PHPUnit8
/usr/share/php/PHPUnit8/Exception.php
/usr/share/php/PHPUnit8/Extensions
/usr/share/php/PHPUnit8/Framework
/usr/share/php/PHPUnit8/Framework/Assert
/usr/share/php/PHPUnit8/Framework/Assert.php
/usr/share/php/PHPUnit8/Framework/Assert/Functions.php
/usr/share/php/PHPUnit8/Framework/Constraint
/usr/share/php/PHPUnit8/Framework/Constraint/ArrayHasKey.php
/usr/share/php/PHPUnit8/Framework/Constraint/ArraySubset.php
/usr/share/php/PHPUnit8/Framework/Constraint/Attribute.php
/usr/share/php/PHPUnit8/Framework/Constraint/Callback.php
/usr/share/php/PHPUnit8/Framework/Constraint/ClassHasAttribute.php
/usr/share/php/PHPUnit8/Framework/Constraint/ClassHasStaticAttribute.php
/usr/share/php/PHPUnit8/Framework/Constraint/Composite.php
/usr/share/php/PHPUnit8/Framework/Constraint/Constraint.php
/usr/share/php/PHPUnit8/Framework/Constraint/Count.php
/usr/share/php/PHPUnit8/Framework/Constraint/DirectoryExists.php
/usr/share/php/PHPUnit8/Framework/Constraint/Exception.php
/usr/share/php/PHPUnit8/Framework/Constraint/ExceptionCode.php
/usr/share/php/PHPUnit8/Framework/Constraint/ExceptionMessage.php
/usr/share/php/PHPUnit8/Framework/Constraint/ExceptionMessageRegularExpression.php
/usr/share/php/PHPUnit8/Framework/Constraint/FileExists.php
/usr/share/php/PHPUnit8/Framework/Constraint/GreaterThan.php
/usr/share/php/PHPUnit8/Framework/Constraint/IsAnything.php
/usr/share/php/PHPUnit8/Framework/Constraint/IsEmpty.php
/usr/share/php/PHPUnit8/Framework/Constraint/IsEqual.php
/usr/share/php/PHPUnit8/Framework/Constraint/IsFalse.php
/usr/share/php/PHPUnit8/Framework/Constraint/IsFinite.php
/usr/share/php/PHPUnit8/Framework/Constraint/IsIdentical.php
/usr/share/php/PHPUnit8/Framework/Constraint/IsInfinite.php
/usr/share/php/PHPUnit8/Framework/Constraint/IsInstanceOf.php
/usr/share/php/PHPUnit8/Framework/Constraint/IsJson.php
/usr/share/php/PHPUnit8/Framework/Constraint/IsNan.php
/usr/share/php/PHPUnit8/Framework/Constraint/IsNull.php
/usr/share/php/PHPUnit8/Framework/Constraint/IsReadable.php
/usr/share/php/PHPUnit8/Framework/Constraint/IsTrue.php
/usr/share/php/PHPUnit8/Framework/Constraint/IsType.php
/usr/share/php/PHPUnit8/Framework/Constraint/IsWritable.php
/usr/share/php/PHPUnit8/Framework/Constraint/JsonMatches.php
/usr/share/php/PHPUnit8/Framework/Constraint/JsonMatchesErrorMessageProvider.php
/usr/share/php/PHPUnit8/Framework/Constraint/LessThan.php
/usr/share/php/PHPUnit8/Framework/Constraint/LogicalAnd.php
/usr/share/php/PHPUnit8/Framework/Constraint/LogicalNot.php
/usr/share/php/PHPUnit8/Framework/Constraint/LogicalOr.php
/usr/share/php/PHPUnit8/Framework/Constraint/LogicalXor.php
/usr/share/php/PHPUnit8/Framework/Constraint/ObjectHasAttribute.php
/usr/share/php/PHPUnit8/Framework/Constraint/RegularExpression.php
/usr/share/php/PHPUnit8/Framework/Constraint/SameSize.php
/usr/share/php/PHPUnit8/Framework/Constraint/StringContains.php
/usr/share/php/PHPUnit8/Framework/Constraint/StringEndsWith.php
/usr/share/php/PHPUnit8/Framework/Constraint/StringMatchesFormatDescription.php
/usr/share/php/PHPUnit8/Framework/Constraint/StringStartsWith.php
/usr/share/php/PHPUnit8/Framework/Constraint/TraversableContains.php
/usr/share/php/PHPUnit8/Framework/Constraint/TraversableContainsEqual.php
/usr/share/php/PHPUnit8/Framework/Constraint/TraversableContainsIdentical.php
/usr/share/php/PHPUnit8/Framework/Constraint/TraversableContainsOnly.php
/usr/share/php/PHPUnit8/Framework/DataProviderTestSuite.php
/usr/share/php/PHPUnit8/Framework/Error
/usr/share/php/PHPUnit8/Framework/Error/Deprecated.php
/usr/share/php/PHPUnit8/Framework/Error/Error.php
/usr/share/php/PHPUnit8/Framework/Error/Notice.php
/usr/share/php/PHPUnit8/Framework/Error/Warning.php
/usr/share/php/PHPUnit8/Framework/Exception
/usr/share/php/PHPUnit8/Framework/Exception/AssertionFailedError.php
/usr/share/php/PHPUnit8/Framework/Exception/CodeCoverageException.php
/usr/share/php/PHPUnit8/Framework/Exception/CoveredCodeNotExecutedException.php
/usr/share/php/PHPUnit8/Framework/Exception/Exception.php
/usr/share/php/PHPUnit8/Framework/Exception/ExpectationFailedException.php
/usr/share/php/PHPUnit8/Framework/Exception/IncompleteTestError.php
/usr/share/php/PHPUnit8/Framework/Exception/InvalidArgumentException.php
/usr/share/php/PHPUnit8/Framework/Exception/InvalidCoversTargetException.php
/usr/share/php/PHPUnit8/Framework/Exception/InvalidDataProviderException.php
/usr/share/php/PHPUnit8/Framework/Exception/MissingCoversAnnotationException.php
/usr/share/php/PHPUnit8/Framework/Exception/NoChildTestSuiteException.php
/usr/share/php/PHPUnit8/Framework/Exception/OutputError.php
/usr/share/php/PHPUnit8/Framework/Exception/PHPTAssertionFailedError.php
/usr/share/php/PHPUnit8/Framework/Exception/RiskyTestError.php
/usr/share/php/PHPUnit8/Framework/Exception/SkippedTestError.php
/usr/share/php/PHPUnit8/Framework/Exception/SkippedTestSuiteError.php
/usr/share/php/PHPUnit8/Framework/Exception/SyntheticError.php
/usr/share/php/PHPUnit8/Framework/Exception/SyntheticSkippedError.php
/usr/share/php/PHPUnit8/Framework/Exception/UnintentionallyCoveredCodeError.php
/usr/share/php/PHPUnit8/Framework/Exception/Warning.php
/usr/share/php/PHPUnit8/Framework/ExceptionWrapper.php
/usr/share/php/PHPUnit8/Framework/IncompleteTest.php
/usr/share/php/PHPUnit8/Framework/IncompleteTestCase.php
/usr/share/php/PHPUnit8/Framework/InvalidParameterGroupException.php
/usr/share/php/PHPUnit8/Framework/MockObject
/usr/share/php/PHPUnit8/Framework/MockObject/Api
/usr/share/php/PHPUnit8/Framework/MockObject/Api/Api.php
/usr/share/php/PHPUnit8/Framework/MockObject/Api/Method.php
/usr/share/php/PHPUnit8/Framework/MockObject/Api/MockedCloneMethod.php
/usr/share/php/PHPUnit8/Framework/MockObject/Api/UnmockedCloneMethod.php
/usr/share/php/PHPUnit8/Framework/MockObject/Builder
/usr/share/php/PHPUnit8/Framework/MockObject/Builder/Identity.php
/usr/share/php/PHPUnit8/Framework/MockObject/Builder/InvocationMocker.php
/usr/share/php/PHPUnit8/Framework/MockObject/Builder/InvocationStubber.php
/usr/share/php/PHPUnit8/Framework/MockObject/Builder/Match_.php
/usr/share/php/PHPUnit8/Framework/MockObject/Builder/MethodNameMatch.php
/usr/share/php/PHPUnit8/Framework/MockObject/Builder/ParametersMatch.php
/usr/share/php/PHPUnit8/Framework/MockObject/Builder/Stub.php
/usr/share/php/PHPUnit8/Framework/MockObject/ConfigurableMethod.php
/usr/share/php/PHPUnit8/Framework/MockObject/Exception
/usr/share/php/PHPUnit8/Framework/MockObject/Exception/BadMethodCallException.php
/usr/share/php/PHPUnit8/Framework/MockObject/Exception/ConfigurableMethodsAlreadyInitializedException.php
/usr/share/php/PHPUnit8/Framework/MockObject/Exception/Exception.php
/usr/share/php/PHPUnit8/Framework/MockObject/Exception/IncompatibleReturnValueException.php
/usr/share/php/PHPUnit8/Framework/MockObject/Exception/RuntimeException.php
/usr/share/php/PHPUnit8/Framework/MockObject/Generator
/usr/share/php/PHPUnit8/Framework/MockObject/Generator.php
/usr/share/php/PHPUnit8/Framework/MockObject/Generator/deprecation.tpl
/usr/share/php/PHPUnit8/Framework/MockObject/Generator/mocked_class.tpl
/usr/share/php/PHPUnit8/Framework/MockObject/Generator/mocked_method.tpl
/usr/share/php/PHPUnit8/Framework/MockObject/Generator/mocked_method_void.tpl
/usr/share/php/PHPUnit8/Framework/MockObject/Generator/mocked_static_method.tpl
/usr/share/php/PHPUnit8/Framework/MockObject/Generator/proxied_method.tpl
/usr/share/php/PHPUnit8/Framework/MockObject/Generator/proxied_method_void.tpl
/usr/share/php/PHPUnit8/Framework/MockObject/Generator/trait_class.tpl
/usr/share/php/PHPUnit8/Framework/MockObject/Generator/wsdl_class.tpl
/usr/share/php/PHPUnit8/Framework/MockObject/Generator/wsdl_method.tpl
/usr/share/php/PHPUnit8/Framework/MockObject/Invocation.php
/usr/share/php/PHPUnit8/Framework/MockObject/InvocationHandler.php
/usr/share/php/PHPUnit8/Framework/MockObject/Matcher.php
/usr/share/php/PHPUnit8/Framework/MockObject/MethodNameConstraint.php
/usr/share/php/PHPUnit8/Framework/MockObject/MockBuilder.php
/usr/share/php/PHPUnit8/Framework/MockObject/MockClass.php
/usr/share/php/PHPUnit8/Framework/MockObject/MockMethod.php
/usr/share/php/PHPUnit8/Framework/MockObject/MockMethodSet.php
/usr/share/php/PHPUnit8/Framework/MockObject/MockObject.php
/usr/share/php/PHPUnit8/Framework/MockObject/MockTrait.php
/usr/share/php/PHPUnit8/Framework/MockObject/MockType.php
/usr/share/php/PHPUnit8/Framework/MockObject/Rule
/usr/share/php/PHPUnit8/Framework/MockObject/Rule/AnyInvokedCount.php
/usr/share/php/PHPUnit8/Framework/MockObject/Rule/AnyParameters.php
/usr/share/php/PHPUnit8/Framework/MockObject/Rule/ConsecutiveParameters.php
/usr/share/php/PHPUnit8/Framework/MockObject/Rule/InvocationOrder.php
/usr/share/php/PHPUnit8/Framework/MockObject/Rule/InvokedAtIndex.php
/usr/share/php/PHPUnit8/Framework/MockObject/Rule/InvokedAtLeastCount.php
/usr/share/php/PHPUnit8/Framework/MockObject/Rule/InvokedAtLeastOnce.php
/usr/share/php/PHPUnit8/Framework/MockObject/Rule/InvokedAtMostCount.php
/usr/share/php/PHPUnit8/Framework/MockObject/Rule/InvokedCount.php
/usr/share/php/PHPUnit8/Framework/MockObject/Rule/MethodName.php
/usr/share/php/PHPUnit8/Framework/MockObject/Rule/Parameters.php
/usr/share/php/PHPUnit8/Framework/MockObject/Rule/ParametersRule.php
/usr/share/php/PHPUnit8/Framework/MockObject/Stub
/usr/share/php/PHPUnit8/Framework/MockObject/Stub.php
/usr/share/php/PHPUnit8/Framework/MockObject/Stub/ConsecutiveCalls.php
/usr/share/php/PHPUnit8/Framework/MockObject/Stub/Exception.php
/usr/share/php/PHPUnit8/Framework/MockObject/Stub/ReturnArgument.php
/usr/share/php/PHPUnit8/Framework/MockObject/Stub/ReturnCallback.php
/usr/share/php/PHPUnit8/Framework/MockObject/Stub/ReturnReference.php
/usr/share/php/PHPUnit8/Framework/MockObject/Stub/ReturnSelf.php
/usr/share/php/PHPUnit8/Framework/MockObject/Stub/ReturnStub.php
/usr/share/php/PHPUnit8/Framework/MockObject/Stub/ReturnValueMap.php
/usr/share/php/PHPUnit8/Framework/MockObject/Stub/Stub.php
/usr/share/php/PHPUnit8/Framework/MockObject/Verifiable.php
/usr/share/php/PHPUnit8/Framework/SelfDescribing.php
/usr/share/php/PHPUnit8/Framework/SkippedTest.php
/usr/share/php/PHPUnit8/Framework/SkippedTestCase.php
/usr/share/php/PHPUnit8/Framework/Test.php
/usr/share/php/PHPUnit8/Framework/TestBuilder.php
/usr/share/php/PHPUnit8/Framework/TestCase.php
/usr/share/php/PHPUnit8/Framework/TestFailure.php
/usr/share/php/PHPUnit8/Framework/TestListener.php
/usr/share/php/PHPUnit8/Framework/TestListenerDefaultImplementation.php
/usr/share/php/PHPUnit8/Framework/TestResult.php
/usr/share/php/PHPUnit8/Framework/TestSuite.php
/usr/share/php/PHPUnit8/Framework/TestSuiteIterator.php
/usr/share/php/PHPUnit8/Framework/WarningTestCase.php
/usr/share/php/PHPUnit8/Runner
/usr/share/php/PHPUnit8/Runner/BaseTestRunner.php
/usr/share/php/PHPUnit8/Runner/DefaultTestResultCache.php
/usr/share/php/PHPUnit8/Runner/Exception.php
/usr/share/php/PHPUnit8/Runner/Filter
/usr/share/php/PHPUnit8/Runner/Filter/ExcludeGroupFilterIterator.php
/usr/share/php/PHPUnit8/Runner/Filter/Factory.php
/usr/share/php/PHPUnit8/Runner/Filter/GroupFilterIterator.php
/usr/share/php/PHPUnit8/Runner/Filter/IncludeGroupFilterIterator.php
/usr/share/php/PHPUnit8/Runner/Filter/NameFilterIterator.php
/usr/share/php/PHPUnit8/Runner/Hook
/usr/share/php/PHPUnit8/Runner/Hook/AfterIncompleteTestHook.php
/usr/share/php/PHPUnit8/Runner/Hook/AfterLastTestHook.php
/usr/share/php/PHPUnit8/Runner/Hook/AfterRiskyTestHook.php
/usr/share/php/PHPUnit8/Runner/Hook/AfterSkippedTestHook.php
/usr/share/php/PHPUnit8/Runner/Hook/AfterSuccessfulTestHook.php
/usr/share/php/PHPUnit8/Runner/Hook/AfterTestErrorHook.php
/usr/share/php/PHPUnit8/Runner/Hook/AfterTestFailureHook.php
/usr/share/php/PHPUnit8/Runner/Hook/AfterTestHook.php
/usr/share/php/PHPUnit8/Runner/Hook/AfterTestWarningHook.php
/usr/share/php/PHPUnit8/Runner/Hook/BeforeFirstTestHook.php
/usr/share/php/PHPUnit8/Runner/Hook/BeforeTestHook.php
/usr/share/php/PHPUnit8/Runner/Hook/Hook.php
/usr/share/php/PHPUnit8/Runner/Hook/TestHook.php
/usr/share/php/PHPUnit8/Runner/Hook/TestListenerAdapter.php
/usr/share/php/PHPUnit8/Runner/NullTestResultCache.php
/usr/share/php/PHPUnit8/Runner/PhptTestCase.php
/usr/share/php/PHPUnit8/Runner/ResultCacheExtension.php
/usr/share/php/PHPUnit8/Runner/StandardTestSuiteLoader.php
/usr/share/php/PHPUnit8/Runner/TestResultCache.php
/usr/share/php/PHPUnit8/Runner/TestSuiteLoader.php
/usr/share/php/PHPUnit8/Runner/TestSuiteSorter.php
/usr/share/php/PHPUnit8/Runner/Version.php
/usr/share/php/PHPUnit8/TextUI
/usr/share/php/PHPUnit8/TextUI/Command.php
/usr/share/php/PHPUnit8/TextUI/Exception.php
/usr/share/php/PHPUnit8/TextUI/Help.php
/usr/share/php/PHPUnit8/TextUI/ResultPrinter.php
/usr/share/php/PHPUnit8/TextUI/TestRunner.php
/usr/share/php/PHPUnit8/Util
/usr/share/php/PHPUnit8/Util/Annotation
/usr/share/php/PHPUnit8/Util/Annotation/DocBlock.php
/usr/share/php/PHPUnit8/Util/Annotation/Registry.php
/usr/share/php/PHPUnit8/Util/Blacklist.php
/usr/share/php/PHPUnit8/Util/Color.php
/usr/share/php/PHPUnit8/Util/Configuration.php
/usr/share/php/PHPUnit8/Util/Configuration.php.rpm
/usr/share/php/PHPUnit8/Util/ConfigurationGenerator.php
/usr/share/php/PHPUnit8/Util/ErrorHandler.php
/usr/share/php/PHPUnit8/Util/Exception.php
/usr/share/php/PHPUnit8/Util/FileLoader.php
/usr/share/php/PHPUnit8/Util/Filesystem.php
/usr/share/php/PHPUnit8/Util/Filter.php
/usr/share/php/PHPUnit8/Util/Getopt.php
/usr/share/php/PHPUnit8/Util/GlobalState.php
/usr/share/php/PHPUnit8/Util/InvalidDataSetException.php
/usr/share/php/PHPUnit8/Util/Json.php
/usr/share/php/PHPUnit8/Util/Log
/usr/share/php/PHPUnit8/Util/Log/JUnit.php
/usr/share/php/PHPUnit8/Util/Log/TeamCity.php
/usr/share/php/PHPUnit8/Util/PHP
/usr/share/php/PHPUnit8/Util/PHP/AbstractPhpProcess.php
/usr/share/php/PHPUnit8/Util/PHP/DefaultPhpProcess.php
/usr/share/php/PHPUnit8/Util/PHP/Template
/usr/share/php/PHPUnit8/Util/PHP/Template/PhptTestCase.tpl
/usr/share/php/PHPUnit8/Util/PHP/Template/TestCaseClass.tpl
/usr/share/php/PHPUnit8/Util/PHP/Template/TestCaseMethod.tpl
/usr/share/php/PHPUnit8/Util/PHP/WindowsPhpProcess.php
/usr/share/php/PHPUnit8/Util/Printer.php
/usr/share/php/PHPUnit8/Util/RegularExpression.php
/usr/share/php/PHPUnit8/Util/Test.php
/usr/share/php/PHPUnit8/Util/TestDox
/usr/share/php/PHPUnit8/Util/TestDox/CliTestDoxPrinter.php
/usr/share/php/PHPUnit8/Util/TestDox/HtmlResultPrinter.php
/usr/share/php/PHPUnit8/Util/TestDox/NamePrettifier.php
/usr/share/php/PHPUnit8/Util/TestDox/ResultPrinter.php
/usr/share/php/PHPUnit8/Util/TestDox/TestDoxPrinter.php
/usr/share/php/PHPUnit8/Util/TestDox/TextResultPrinter.php
/usr/share/php/PHPUnit8/Util/TestDox/XmlResultPrinter.php
/usr/share/php/PHPUnit8/Util/TextTestListRenderer.php
/usr/share/php/PHPUnit8/Util/Type.php
/usr/share/php/PHPUnit8/Util/VersionComparisonOperator.php
/usr/share/php/PHPUnit8/Util/XdebugFilterScriptGenerator.php
/usr/share/php/PHPUnit8/Util/Xml.php
/usr/share/php/PHPUnit8/Util/XmlTestListRenderer.php
/usr/share/php/PHPUnit8/autoload.php
/usr/share/php/PHPUnit8/phpunit.xsd

References

Summary

In this tutorial we learn how to install phpunit8 on Fedora 34 using yum and dnf.