Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on May 9, 2024 via composer

phpunit/phpunit 10.4.1

The PHP Unit Testing framework.
Package summary
Share
0
issues
2
licenses
25
BSD-3-Clause
1
MIT
Package created
18 Sep 2012
Version published
8 Oct 2023
Maintainers
1
Total deps
26
Direct deps
19
License
BSD-3-Clause

Issues

0
This package has no issues

Licenses

BSD 3-Clause "New" or "Revised" License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
place-warranty
Cannot
use-trademark
hold-liable
Must
include-copyright
include-license
25 Packages, Including:
nikic/php-parser@v5.0.2
phar-io/manifest@2.0.4
phar-io/version@3.2.1
phpunit/php-code-coverage@10.1.14
phpunit/php-file-iterator@4.1.0
phpunit/php-invoker@4.0.0
phpunit/php-text-template@3.0.1
phpunit/php-timer@6.0.0
phpunit/phpunit@10.4.1
sebastian/cli-parser@2.0.1
sebastian/code-unit@2.0.0
sebastian/code-unit-reverse-lookup@3.0.0
sebastian/comparator@5.0.1
sebastian/complexity@3.2.0
sebastian/diff@5.1.1
sebastian/environment@6.1.0
sebastian/exporter@5.1.2
sebastian/global-state@6.0.2
sebastian/lines-of-code@2.0.2
sebastian/object-enumerator@5.0.0
sebastian/object-reflector@3.0.0
sebastian/recursion-context@5.0.0
sebastian/type@4.0.0
sebastian/version@4.0.1
theseer/tokenizer@1.2.3

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
myclabs/deep-copy@1.11.1
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

19
All Dependencies CSV
β“˜ This is a list of phpunit/phpunit 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
myclabs/deep-copy1.11.122.96 kBMIT
prod
phar-io/manifest2.0.4-BSD-3-Clause
prod
phar-io/version3.2.118.12 kBBSD-3-Clause
prod
phpunit/php-code-coverage10.1.14-BSD-3-Clause
prod
phpunit/php-file-iterator4.1.09.41 kBBSD-3-Clause
prod
phpunit/php-invoker4.0.07.45 kBBSD-3-Clause
prod
phpunit/php-text-template3.0.17.22 kBBSD-3-Clause
prod
phpunit/php-timer6.0.09.36 kBBSD-3-Clause
prod
sebastian/cli-parser2.0.1-BSD-3-Clause
prod
sebastian/code-unit2.0.014.94 kBBSD-3-Clause
prod
sebastian/comparator5.0.119.55 kBBSD-3-Clause
prod
sebastian/diff5.1.1-BSD-3-Clause
prod
sebastian/environment6.1.0-BSD-3-Clause
prod
sebastian/exporter5.1.2-BSD-3-Clause
prod
sebastian/global-state6.0.2-BSD-3-Clause
prod
sebastian/object-enumerator5.0.05.55 kBBSD-3-Clause
prod
sebastian/recursion-context5.0.05.15 kBBSD-3-Clause
prod
sebastian/type4.0.020.88 kBBSD-3-Clause
prod
sebastian/version4.0.15.02 kBBSD-3-Clause
prod

Visualizations

Frequently Asked Questions

What does phpunit/phpunit do?

PHPUnit is a programmer-oriented testing framework for PHP. It follows an instance of the xUnit architecture for unit testing frameworks, serving as a robust system designed to facilitate easy and efficient testing of the individual units of source code in your PHP applications. This ensures that your code is thoroughly vetted and expected to perform optimally.

How do you use phpunit/phpunit?

To use PHPUnit, first you'll need to install it. There are primarily two ways to do this:

Using PHAR:

You can download a PHP Archive (PHAR) that contains all the required dependencies of PHPUnit in a single file. Here's how to do it:

$ wget https://phar.phpunit.de/phpunit-X.Y.phar
$ php phpunit-X.Y.phar --version

Please replace X.Y with the version of PHPUnit you are interested in.

Using Composer:

Another way to install PHPUnit is by using Composer, a tool for dependency management in PHP.

$ composer require --dev phpunit/phpunit ^10

After installation, you can write PHPUnit tests for your PHP applications. For example:

use PHPUnit\Framework\TestCase;

class SomeClassTest extends TestCase
{
    public function testPerform()
    {
        $instance = new SomeClass();

        $result = $instance->perform('action');

        $this->assertSame('expected', $result);
    }
}

And then run them using the PHPUnit PHAR or vendor/bin/phpunit:

$ ./phpunit-X.Y.phar tests
or
$ ./vendor/bin/phpunit tests

Where are the phpunit/phpunit docs?

The documentation for PHPUnit is available on the official PHPUnit website and it provides an in-depth guide on getting started with PHPUnit and its various modules. You can also check the documentation and contribution guidelines on their official GitHub repository. The contributors to the documentation can be found here.