{"id":18566197,"url":"https://github.com/atoum/phpunit-extension","last_synced_at":"2025-04-10T05:32:15.067Z","repository":{"id":62489381,"uuid":"49300940","full_name":"atoum/phpunit-extension","owner":"atoum","description":"atoum PHPUnit extension — Run your PHPUnit tests with atoum","archived":false,"fork":false,"pushed_at":"2018-01-30T09:06:47.000Z","size":158,"stargazers_count":8,"open_issues_count":3,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-24T16:46:12.010Z","etag":null,"topics":["atoum","php","phpunit","test","test-framework","testing-tools","unit-testing"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/atoum.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-01-08T22:47:21.000Z","updated_at":"2025-01-07T14:00:49.000Z","dependencies_parsed_at":"2022-11-02T11:01:10.232Z","dependency_job_id":null,"html_url":"https://github.com/atoum/phpunit-extension","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atoum%2Fphpunit-extension","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atoum%2Fphpunit-extension/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atoum%2Fphpunit-extension/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atoum%2Fphpunit-extension/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/atoum","download_url":"https://codeload.github.com/atoum/phpunit-extension/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248163198,"owners_count":21057889,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["atoum","php","phpunit","test","test-framework","testing-tools","unit-testing"],"created_at":"2024-11-06T22:22:10.770Z","updated_at":"2025-04-10T05:32:14.662Z","avatar_url":"https://github.com/atoum.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# atoum/phpunit-extension [![Build Status](https://travis-ci.org/atoum/phpunit-extension.svg?branch=master)](https://travis-ci.org/atoum/phpunit-extension)\n\nThis atoum extensions allows to run your existing PHPUnit test suites\nwith atoum's engine! If you want to migrate from PHPUnit to atoum,\nthis extension is your best companion!\n\n## Goals\n\nYour project already has PHPUnit test suites. You felt in love with\natoum. You want to replace PHPUnit by atoum on your project. This\nextension will allow you to run your PHPUnit test suites with atoum,\nensuring a smooth migration.\n\n## Install it\n\nThe extension is still a work in progress. You need to require a\ndeveloppement branch of atoum.\n\nNote: We need your help to complete the extension, so feel free to\ntest the extension and submit issues when you found one.\n\nInstall extension using [Composer](https://getcomposer.org):\n\n```json\n{\n    \"require-dev\": {\n        \"atoum/atoum\": \"dev-virtual-hooks\",\n        \"atoum/phpunit-extension\": \"~0.6\"\n    }\n}\n```\n\nEnable the extension using atoum configuration file:\n\n```php\n\u003c?php\n\n// .atoum.php\n\nrequire_once __DIR__ . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php';\n\nuse mageekguy\\atoum\\phpunit;\n\n$extension = new phpunit\\extension($script);\n$extension-\u003eaddToRunner($runner);\n```\n\n## Use it\n\nBy default, everything should work, simply run `atoum` as usual and\nyour test suites will execute.\n\nIf you want to switch a test suite from PHPUnit to atoum, and get all\nthe features from atoum, replace the parent class of your test suites\nfrom `PHPUnit\\Framework\\TestCase` to `mageekguy\\atoum\\phpunit`:\n\n```diff\n-class EnumTest extends \\PHPUnit\\Framework\\TestCase\n+class EnumTest extends \\mageekguy\\atoum\\phpunit\n```\n\nEnjoy!\n\n## Support\n\n### Helpers\n\n| Method                                                                                   | Supported |\n|------------------------------------------------------------------------------------------|:---------:|\n| `fail`                                                                                   | ❌         |\n| `markTestIncomplete`                                                                     | ❌         |\n| `markTestSkipped`                                                                        | ✅         |\n| *Total*                                                                                  | 33%       |\n\n### Assertions\n\n| Method                                                                                                             | Supported |\n|--------------------------------------------------------------------------------------------------------------------|:---------:|\n| `assertArrayHasKey(mixed $key, array $array[, string $message = ''])`                                              | ✅         |\n| `assertArrayNotHasKey`                                                                                             | ❌         |\n| `assertClassHasAttribute`                                                                                          | ❌         |\n| `assertClassNotHasAttribute`                                                                                       | ❌         |\n| `assertArraySubset(array $subset, array $array[, bool $strict = '', string $message = ''])`                        | ✅         |\n| `assertClassHasStaticAttribute`                                                                                    | ❌         |\n| `assertClassNotHasStaticAttribute`                                                                                 | ❌         |\n| `assertContains(mixed $needle, iterable $haystack[, string $message = ''])`                                        | ✅         |\n| `assertContains(string $needle, string $haystack[, string $message = '', boolean $ignoreCase = FALSE])`            | ✅         |\n| `assertNotContains`                                                                                                | ❌         |\n| `assertContainsOnly(string $type, iterable $haystack[, boolean $isNativeType = NULL, string $message = ''])`       | ✅         |\n| `assertContainsOnlyInstancesOf(string $classname, iterable $haystack[, string $message = ''])`                     | ✅         |\n| `assertNotContainsOnly`                                                                                            | ❌         |\n| `assertCount($expectedCount, $haystack[, string $message = ''])`                                                   | ✅         |\n| `assertNotCount($expectedCount, $haystack[, string $message = ''])`                                                | ✅         |\n| `assertEmpty(mixed $actual[, string $message = ''])`                                                               | ✅         |\n| `assertNotEmpty(mixed $actual[, string $message = ''])`                                                            | ✅         |\n| `assertEqualXMLStructure`                                                                                          | ❌         |\n| `assertEquals(mixed $expected, mixed $actual[, string $message = ''])`                                             | ✅         |\n| `assertEquals(float $expected, float $actual[, string $message = '', float $delta = 0])`                           | ✅         |\n| `assertEquals(DOMDocument $expected, DOMDocument $actual[, string $message = ''])`                                 | ❌         |\n| `assertEquals(object $expected, object $actual[, string $message = ''])`                                           | ✅         |\n| `assertEquals(array $expected, array $actual[, string $message = ''])`                                             | ✅         |\n| `assertNotEquals`                                                                                                  | ❌         |\n| `assertFalse(bool $condition[, string $message = ''])`                                                             | ✅         |\n| `assertNotFalse`                                                                                                   | ❌         |\n| `assertFileEquals`                                                                                                 | ❌         |\n| `assertFileNotEquals`                                                                                              | ❌         |\n| `assertFileExists`                                                                                                 | ❌         |\n| `assertFileNotExists`                                                                                              | ❌         |\n| `assertGreaterThan(mixed $expected, mixed $actual[, string $message = ''])`                                        | ✅         |\n| `assertGreaterThanOrEqual(mixed $expected, mixed $actual[, string $message = ''])`                                 | ✅         |\n| `assertInfinite(mixed $variable[, string $message = ''])`                                                          | ✅         |\n| `assertFinite(mixed $variable[, string $message = ''])`                                                            | ✅         |\n| `assertInstanceOf($expected, $actual[, $message = ''])`                                                            | ✅         |\n| `assertNotInstanceOf($expected, $actual[, $message = ''])`                                                         | ❌         |\n| `assertInternalType($expected, $actual[, $message = ''])`                                                          | ✅         |\n| `assertNotInternalType`                                                                                            | ❌         |\n| `assertJsonFileEqualsJsonFile`                                                                                     | ❌         |\n| `assertJsonStringEqualsJsonFile`                                                                                   | ❌         |\n| `assertJsonStringEqualsJsonString`                                                                                 | ❌         |\n| `assertLessThan`                                                                                                   | ❌         |\n| `assertLessThanOrEqual`                                                                                            | ❌         |\n| `assertNan(mixed $variable[, string $message = ''])`                                                               | ✅         |\n| `assertNull(mixed $variable[, string $message = ''])`                                                              | ✅         |\n| `assertNotNull(mixed $variable[, string $message = ''])`                                                           | ✅         |\n| `assertObjectHasAttribute(string $attribute[, string $message = ''])`                                              | ✅         |\n| `assertObjectNotHasAttribute(string $attribute[, string $message = ''])`                                           | ✅         |\n| `assertRegExp`                                                                                                     | ❌         |\n| `assertNotRegExp`                                                                                                  | ❌         |\n| `assertStringMatchesFormat`                                                                                        | ❌         |\n| `assertStringNotMatchesFormat`                                                                                     | ❌         |\n| `assertStringMatchesFormatFile`                                                                                    | ❌         |\n| `assertStringNotMatchesFormatFile`                                                                                 | ❌         |\n| `assertSame(mixed $expected, mixed $actual[, string $message = ''])`                                               | ✅         |\n| `assertNotSame(mixed $expected, mixed $actual[, string $message = ''])`                                            | ✅         |\n| `assertStringEndsWith`                                                                                             | ❌         |\n| `assertStringEndsNotWith`                                                                                          | ❌         |\n| `assertStringEqualsFile`                                                                                           | ❌         |\n| `assertStringNotEqualsFile`                                                                                        | ❌         |\n| `assertStringStartsWith`                                                                                           | ❌         |\n| `assertStringStartsNotWith`                                                                                        | ❌         |\n| `assertThat(mixed $value, PHPUnit_Framework_Constraint $constraint[, $message = ''])`                              | ✅         |\n| `assertTrue(bool $condition[, string $message = ''])`                                                              | ✅         |\n| `assertNotTrue`                                                                                                    | ❌         |\n| `assertXmlFileEqualsXmlFile`                                                                                       | ❌         |\n| `assertXmlFileNotEqualsXmlFile`                                                                                    | ❌         |\n| `assertXmlStringEqualsXmlFile`                                                                                     | ❌         |\n| `assertXmlStringNotEqualsXmlFile`                                                                                  | ❌         |\n| `assertXmlStringEqualsXmlString`                                                                                   | ❌         |\n| `assertXmlStringNotEqualsXmlString`                                                                                | ❌         |\n| *Total*                                                                                                            | 42.25%    |\n\n### Classes\n\n| Class                          | Supported | Mapped to                            |\n|--------------------------------|:---------:|--------------------------------------|\n| `PHPUnit\\Framework\\TestCase`   | ✅         | `mageekguy\\atoum\\phpunit\\test`       |\n| `PHPUnit\\Framework\\Constraint` | ✅         | `mageekguy\\atoum\\phpunit\\constraint` |\n| *Total*                        | 100%      |                                      |\n\n### Exceptions\n\n| Class                                          | Supported | Mapped to                                      |\n|------------------------------------------------|:---------:|------------------------------------------------|\n| `PHPUnit\\Framework\\AssertionFailedError`       | ✅         | `mageekguy\\atoum\\asserter\\exception`           |\n| `PHPUnit\\Framework\\Exception`                  | ✅         | `mageekguy\\atoum\\exceptions\\runtime`           |\n| `PHPUnit\\Framework\\ExpectationFailedException` | ✅         | `mageekguy\\atoum\\phpunit\\constraint\\exception` |\n| *Total*                                        | 100%      |                                                |\n\n### Annotations\n\n| Annotation                        | Supported | Note                                              |\n|-----------------------------------|:---------:|:-------------------------------------------------:|\n| `@author`                         | ✅         |                                                   |\n| `@after`                          | ❌         |                                                   |\n| `@afterClass`                     | ❌         |                                                   |\n| `@backupGlobals`                  | ❌         |                                                   |\n| `@backupStaticAttributes`         | ❌         |                                                   |\n| `@before`                         | ❌         |                                                   |\n| `@beforeClass`                    | ❌         |                                                   |\n| `@codeCoverageIgnore*`            | ❌         |                                                   |\n| `@covers`                         | ✅         | Does only consider the class name.                |\n| `@coversDefaultClass`             | ✅         |                                                   |\n| `@coversNothing`                  | ✅         |                                                   |\n| `@dataProvider`                   | ✅         |                                                   |\n| `@depends`                        | ❌         |                                                   |\n| `@expectedException`              | ❌         |                                                   |\n| `@expectedExceptionCode`          | ❌         |                                                   |\n| `@expectedExceptionMessage`       | ❌         |                                                   |\n| `@expectedExceptionMessageRegExp` | ❌         |                                                   |\n| `@group`                          | ✅         |                                                   |\n| `@large`                          | ✅         | Does not support strict-mode failures             |\n| `@medium`                         | ✅         | Does not support strict-mode failures             |\n| `@preserveGlobalState`            | ❌         |                                                   |\n| `@requires`                       | ❌         |                                                   |\n| `@runTestsInSeparateProcesses`    | ✅         | Does not preserve global state in child processes |\n| `@runInSeparateProcess`           | ✅         | Does not preserve global state in child processes |\n| `@small`                          | ✅         | Does not support strict-mode failures             |\n| `@test`                           | ❌         |                                                   |\n| `@testdox`                        | ❌         |                                                   |\n| `@ticket`                         | ❌         |                                                   |\n| `@uses`                           | ❌         |                                                   |\n| *Total*                           | 37.93%    |                                                   |\n\n## Links\n\n* [atoum](http://atoum.org)\n* [atoum's documentation](http://docs.atoum.org)\n* [PHPUnit](https://phpunit.de/)\n\n\n## License\n\nphpunit-extension is released under the BSD-3-Clause License. See the bundled LICENSE file for details.\n\n![atoum](http://atoum.org/images/logo/atoum.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatoum%2Fphpunit-extension","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fatoum%2Fphpunit-extension","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatoum%2Fphpunit-extension/lists"}