atoum 3.2.0

atoum is a PHP unit testing framework and harness. It provides a simpler and modern assertion syntax with fluid syntax and extensive comperators, mocking and native function monkeys, a test case runner based on autocleaning and parallelized process separation, with xUnit/Cover reporting. It requires less configuration overhead and comes as a contemporary Phar runtime. While it hasn't all features of Pythons `nose`, nor provides interpreted language introspection, atoum succeeds as a way more convenient PHPUnit alternative.

Tags php testing framework unit-testing xunit assertion-framework fluid phar
License MITL
State beta

Recent Releases

3.2.008 Sep 2017 15:25 major bugfix: Avoid many memory allocations in error report field. Display clear errors when mocking function fails. Command line switches override configuration file directives. Uncompleted methods make atoum exit with an error code. The `exception::isInstanceOf` asserter correctly works with interfaces. Remove dependency on `ext-session`.
3.1.012 Jul 2017 10:25 major bugfix: Remove an autoloader cache warning. Add nullable type support in the mock engine. `object` is a reserved keyword as of PHP 7.2. Results are folded on Travis CI. Exception asserter now has `isInstanceOf` without parenthesis. Stream asserter now has `isRead` and `isWritten` assertion (without brackets). Mock generator supports `strict_types`. : Mock generator correctly handles `void` return type.
3.0.023 Feb 2017 10:25 major bugfix: New asserter: `generator`. The VIM plugin has been moved to atoum/vim-plugin. Remove reserved keyword, replace void by blank. atoum now requires PHP ` =5.6.0`. : how annotations are extracted. Only those actually starting with `@` are handled. Avoid reporting incorrect atoum path.
2.9.012 Feb 2017 21:45 major feature: Assert on array values using `mageekguy atoum asserters phpArray:: values`. Do not call parent class when mocking as interface. Copy `PHP_IDE_CONFIG` into forked processes. Each mock instance can be made unique by calling `eachInstanceIsUnique` on the mock generator. 2.9.0-beta1 - 2016-10-08. Add a `addConfigurationCallable` method on the runner to allow extensions to register themselves. Only one extension of a kind can be loaded. Extensions can be unloaded. Add branches and paths coverage support to AtoumTask for Phing. : Mock generator correctly handles the `self` return type. Errors are displayed in the TAP report.
2.8.213 Aug 2016 12:05 minor feature: Add HTML coverage report from reports extension to AtoumTask for Phing. Add telemetry support to AtoumTask.
2.7.021 May 2016 23:25 major bugfix: Add telemtry report to CI builds. : Reports override correctly when using -ulr/-utr. Assertions on PHP 7 exceptions/throwables/errors are now working correctly.
2.6.010 Mar 2016 03:16 major bugfix: Use in-memory cache for resolved asserters. Extract loop logic from runner and add a looper interface. : Asserting on zeroes with the phpFloat asserter. How arguments are passed when using loop mode. Arguments priority parsing when they have no priority.
2.5.009 Jan 2016 06:45 major feature: Add a `newMockInstance` helper method on test class @Grummfy . The `dateTime` asserter now supports ` dateTimeImmutable`. Assert on child arrays using the `phpArray` asserter. New `toArray` (along with `toArray` method on `phpString` and `object` asserters) and `iterator` asserters. New `resource` asserter group (with `isOfType` or `is*` wildcard like `isStream`). Allow extensions to define configuration. Mock generator supports variadic arguments passed by reference. Auto generate and inject mocks in test methods. : PHAR can be built on Windows. Extracted mocked method signature generation to make it work with visibility extension. `exception` asserter handles PHP 7 throwables.
2.4.008 Dec 2015 07:45 major bugfix: Introduce the constant mocker. Update atoum's PHAR against Github releases with `--github-update`. PHP7 support in the basic resolver. Add a "callStaticOnTestedClass" method. Reset PHP7 configuration for tests. : Mock asserter is not case sensitive.
2.3.016 Nov 2015 13:05 major bugfix: O15-10-22 Add atoum path and version to default CLI report. Improve `setTestNamespace` parameters validation. : "DOMElement::setIdAttribute(): ID otherMethod already defined" error.
2.2.218 Sep 2015 19:25 minor bugfix: Fail message forwarding from `match` to `matches` in string asserter. Exit code when there is something wrong in the configuration file.
2.2.002 Aug 2015 05:45 minor feature: Hide classes and methods coverage details in CLI report. Add the method return type and parameter type in the mock generator. Add `isNotEmpty` asserter on `array`. Add relative url root choice for code coverage report.
2.1.009 May 2015 12:25 minor feature: Support branches and paths coverage with Xdebug 2.3. Support old-style constructors in mocks. `phpClass` asserter will throw atoum's logic exceptions instead of native reflection exceptions. Fixed an error when using `DebugClassLoader` autoloader and atoum-bundle (https://github.com/atoum/AtoumBundle). Rename asserters classes for PHP7. Removed usage of die in deprecated methods. Properly report skipped method due to a missing extension. Add PHP 7.0 in the build matrix. Add the `let` assertion handler. Autoloader should resolve classes step by step.
2.0.128 Feb 2015 15:05 minor feature: configurations` option should be handled first Since atoum is 2.*, branch-alias must follow Autoloader should not try to resolve alias if requested class exists Generalize method call checking in mock Partially revert BC break introduced in
2.0.014 Feb 2015 22:45 minor feature: BC break updates atoum test::beforeTestMethod` is called before the tested class is loaded Other updates Tested class should not be mock as an interface. Add `atoum mock generator::allIsInterface` to definitely disable all parent classes' behaviors in mocks atoum asserters mock::receive` is an alias to `atoum asserters mock::call`
1.2.214 Jan 2015 13:05 minor feature: 415 Fix a bug in the coverage report with excluded classes 406 Fix a bug in the HTML coverage with stylesheet URLs 418 Fix a bug when a mocked method returns a reference
1.2.110 Jan 2015 19:25 minor feature: Fix a bug in the exit code management Use semantics dates in `CHANGELOG.md`
1.2.029 Dec 2014 08:05 documentation: Extract mock autoloader. Fix a bug when setting the default mock namespace. Support assertion without parenthesis on `dateInterval`, `error`, `extension` and `hash` asserters. Use new Travis container infrastructure. Add the Santa report and an example configuration file. Mock generator now handles variadic arguments in method. Replace broken documentation links. Rename `match` to `matches` on the string asserter. Rename the PHAR to `atoum.phar`. Fix broken links in `README.md`. Add dates in `CHANGELOG.md`. Fix `newTestedInstance` assertion when constructor contains a variable-length argument.
1.1.015 Dec 2014 03:15 minor feature: 377 Hide error when publishing report to coveralls.io fails 368 Improve dataset key reporting in case of failure 376 Add branch-alias 367 Add the `isFinal` assertion on the `phpClass`/`class`/`testedClass` asserters
1.0.001 Dec 2014 14:15 major feature: Allow/Disallow mocking undefined methods. Pass test instance as first parameters of closures in exception , when , output. Add --fail-if-void-methods and --fail-if-skipped-methods. --init option now accepts a path to a directory to initialize with atoum --configuration. Add coverage script to automatically produce reports. Add isFluent. Add isNull , isNotNull , isCallable , isNotCallable , isNotTrue , isNotFalse assertions on variable. Add isTestedInstance assertion on object asserter. Add testedInstance helper. Add newTestedInstance and newInstance helpers. Add isNotInstanceOf assertion on object asserter. Alias assertions from test classes. Register asserters from test classes. Define new assertion directly from test classes. Change test method prefix using @methodPrefix on test classes. Add CHANGELOG.md.