2017-25 ยฉ Pedro Pelรกez
 

library phpunit-extension

atoum PHPUnit extension - Run your PHPUnit tests with atoum

image

atoum/phpunit-extension

atoum PHPUnit extension - Run your PHPUnit tests with atoum

  • Tuesday, January 30, 2018
  • by agallou
  • Repository
  • 2 Watchers
  • 8 Stars
  • 24 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 2 Open issues
  • 9 Versions
  • 0 % Grown

The README.md

atoum/phpunit-extension Build Status

This atoum extensions allows to run your existing PHPUnit test suites with atoum's engine! If you want to migrate from PHPUnit to atoum, this extension is your best companion!, (*1)

Goals

Your project already has PHPUnit test suites. You felt in love with atoum. You want to replace PHPUnit by atoum on your project. This extension will allow you to run your PHPUnit test suites with atoum, ensuring a smooth migration., (*2)

Install it

The extension is still a work in progress. You need to require a developpement branch of atoum., (*3)

Note: We need your help to complete the extension, so feel free to test the extension and submit issues when you found one., (*4)

Install extension using Composer:, (*5)

{
    "require-dev": {
        "atoum/atoum": "dev-virtual-hooks",
        "atoum/phpunit-extension": "~0.6"
    }
}

Enable the extension using atoum configuration file:, (*6)

<?php

// .atoum.php

require_once __DIR__ . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php';

use mageekguy\atoum\phpunit;

$extension = new phpunit\extension($script);
$extension->addToRunner($runner);

Use it

By default, everything should work, simply run atoum as usual and your test suites will execute., (*7)

If you want to switch a test suite from PHPUnit to atoum, and get all the features from atoum, replace the parent class of your test suites from PHPUnit\Framework\TestCase to mageekguy\atoum\phpunit:, (*8)

-class EnumTest extends \PHPUnit\Framework\TestCase
+class EnumTest extends \mageekguy\atoum\phpunit

Enjoy!, (*9)

Support

Helpers

Method Supported
fail โŒ
markTestIncomplete โŒ
markTestSkipped โœ…
Total 33%

Assertions

Method Supported
assertArrayHasKey(mixed $key, array $array[, string $message = '']) โœ…
assertArrayNotHasKey โŒ
assertClassHasAttribute โŒ
assertClassNotHasAttribute โŒ
assertArraySubset(array $subset, array $array[, bool $strict = '', string $message = '']) โœ…
assertClassHasStaticAttribute โŒ
assertClassNotHasStaticAttribute โŒ
assertContains(mixed $needle, iterable $haystack[, string $message = '']) โœ…
assertContains(string $needle, string $haystack[, string $message = '', boolean $ignoreCase = FALSE]) โœ…
assertNotContains โŒ
assertContainsOnly(string $type, iterable $haystack[, boolean $isNativeType = NULL, string $message = '']) โœ…
assertContainsOnlyInstancesOf(string $classname, iterable $haystack[, string $message = '']) โœ…
assertNotContainsOnly โŒ
assertCount($expectedCount, $haystack[, string $message = '']) โœ…
assertNotCount($expectedCount, $haystack[, string $message = '']) โœ…
assertEmpty(mixed $actual[, string $message = '']) โœ…
assertNotEmpty(mixed $actual[, string $message = '']) โœ…
assertEqualXMLStructure โŒ
assertEquals(mixed $expected, mixed $actual[, string $message = '']) โœ…
assertEquals(float $expected, float $actual[, string $message = '', float $delta = 0]) โœ…
assertEquals(DOMDocument $expected, DOMDocument $actual[, string $message = '']) โŒ
assertEquals(object $expected, object $actual[, string $message = '']) โœ…
assertEquals(array $expected, array $actual[, string $message = '']) โœ…
assertNotEquals โŒ
assertFalse(bool $condition[, string $message = '']) โœ…
assertNotFalse โŒ
assertFileEquals โŒ
assertFileNotEquals โŒ
assertFileExists โŒ
assertFileNotExists โŒ
assertGreaterThan(mixed $expected, mixed $actual[, string $message = '']) โœ…
assertGreaterThanOrEqual(mixed $expected, mixed $actual[, string $message = '']) โœ…
assertInfinite(mixed $variable[, string $message = '']) โœ…
assertFinite(mixed $variable[, string $message = '']) โœ…
assertInstanceOf($expected, $actual[, $message = '']) โœ…
assertNotInstanceOf($expected, $actual[, $message = '']) โŒ
assertInternalType($expected, $actual[, $message = '']) โœ…
assertNotInternalType โŒ
assertJsonFileEqualsJsonFile โŒ
assertJsonStringEqualsJsonFile โŒ
assertJsonStringEqualsJsonString โŒ
assertLessThan โŒ
assertLessThanOrEqual โŒ
assertNan(mixed $variable[, string $message = '']) โœ…
assertNull(mixed $variable[, string $message = '']) โœ…
assertNotNull(mixed $variable[, string $message = '']) โœ…
assertObjectHasAttribute(string $attribute[, string $message = '']) โœ…
assertObjectNotHasAttribute(string $attribute[, string $message = '']) โœ…
assertRegExp โŒ
assertNotRegExp โŒ
assertStringMatchesFormat โŒ
assertStringNotMatchesFormat โŒ
assertStringMatchesFormatFile โŒ
assertStringNotMatchesFormatFile โŒ
assertSame(mixed $expected, mixed $actual[, string $message = '']) โœ…
assertNotSame(mixed $expected, mixed $actual[, string $message = '']) โœ…
assertStringEndsWith โŒ
assertStringEndsNotWith โŒ
assertStringEqualsFile โŒ
assertStringNotEqualsFile โŒ
assertStringStartsWith โŒ
assertStringStartsNotWith โŒ
assertThat(mixed $value, PHPUnit_Framework_Constraint $constraint[, $message = '']) โœ…
assertTrue(bool $condition[, string $message = '']) โœ…
assertNotTrue โŒ
assertXmlFileEqualsXmlFile โŒ
assertXmlFileNotEqualsXmlFile โŒ
assertXmlStringEqualsXmlFile โŒ
assertXmlStringNotEqualsXmlFile โŒ
assertXmlStringEqualsXmlString โŒ
assertXmlStringNotEqualsXmlString โŒ
Total 42.25%

Classes

Class Supported Mapped to
PHPUnit\Framework\TestCase โœ… mageekguy\atoum\phpunit\test
PHPUnit\Framework\Constraint โœ… mageekguy\atoum\phpunit\constraint
Total 100%

Exceptions

Class Supported Mapped to
PHPUnit\Framework\AssertionFailedError โœ… mageekguy\atoum\asserter\exception
PHPUnit\Framework\Exception โœ… mageekguy\atoum\exceptions\runtime
PHPUnit\Framework\ExpectationFailedException โœ… mageekguy\atoum\phpunit\constraint\exception
Total 100%

Annotations

Annotation Supported Note
@author โœ…
@after โŒ
@afterClass โŒ
@backupGlobals โŒ
@backupStaticAttributes โŒ
@before โŒ
@beforeClass โŒ
@codeCoverageIgnore* โŒ
@covers โœ… Does only consider the class name.
@coversDefaultClass โœ…
@coversNothing โœ…
@dataProvider โœ…
@depends โŒ
@expectedException โŒ
@expectedExceptionCode โŒ
@expectedExceptionMessage โŒ
@expectedExceptionMessageRegExp โŒ
@group โœ…
@large โœ… Does not support strict-mode failures
@medium โœ… Does not support strict-mode failures
@preserveGlobalState โŒ
@requires โŒ
@runTestsInSeparateProcesses โœ… Does not preserve global state in child processes
@runInSeparateProcess โœ… Does not preserve global state in child processes
@small โœ… Does not support strict-mode failures
@test โŒ
@testdox โŒ
@ticket โŒ
@uses โŒ
Total 37.93%

License

phpunit-extension is released under the BSD-3-Clause License. See the bundled LICENSE file for details., (*10)

atoum, (*11)

The Versions

30/01 2018

dev-master

9999999-dev http://www.atoum.org

atoum PHPUnit extension - Run your PHPUnit tests with atoum

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Avatar jubianchi

tdd test phpunit unit testing atoum atoum-extension

30/01 2018

0.6

0.6.0.0 http://www.atoum.org

atoum PHPUnit extension - Run your PHPUnit tests with atoum

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Avatar jubianchi

tdd test phpunit unit testing atoum atoum-extension

15/12 2017

0.5

0.5.0.0 http://www.atoum.org

atoum PHPUnit extension - Run your PHPUnit tests with atoum

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Avatar jubianchi

tdd test phpunit unit testing atoum atoum-extension

21/11 2017

0.4.1

0.4.1.0 http://www.atoum.org

atoum PHPUnit extension - Run your PHPUnit tests with atoum

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Avatar jubianchi

tdd test phpunit unit testing atoum atoum-extension

09/10 2017

0.4.0

0.4.0.0 http://www.atoum.org

atoum PHPUnit extension - Run your PHPUnit tests with atoum

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Avatar jubianchi

tdd test phpunit unit testing atoum atoum-extension

04/10 2017

0.3.0

0.3.0.0 http://www.atoum.org

atoum PHPUnit extension - Run your PHPUnit tests with atoum

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Avatar jubianchi

tdd test phpunit unit testing atoum atoum-extension

04/10 2017

0.2.1

0.2.1.0 http://www.atoum.org

atoum PHPUnit extension - Run your PHPUnit tests with atoum

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Avatar jubianchi

tdd test phpunit unit testing atoum atoum-extension

02/10 2017

0.2

0.2.0.0 http://www.atoum.org

atoum PHPUnit extension - Run your PHPUnit tests with atoum

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Avatar jubianchi

tdd test phpunit unit testing atoum atoum-extension

02/10 2017

0.1

0.1.0.0 http://www.atoum.org

atoum PHPUnit extension - Run your PHPUnit tests with atoum

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Avatar jubianchi

tdd test phpunit unit testing atoum atoum-extension