2017 © Pedro Peláez
 

library stubs

Stubs for atoum, the simple modern and intuitive unit testing framework for PHP 5.3+

image

atoum/stubs

Stubs for atoum, the simple modern and intuitive unit testing framework for PHP 5.3+

  • Monday, January 29, 2018
  • by agallou
  • Repository
  • 8 Watchers
  • 14 Stars
  • 124,440 Installations
  • PHP
  • 41 Dependents
  • 1 Suggesters
  • 4 Forks
  • 4 Open issues
  • 5 Versions
  • 14 % Grown

The README.md

atoum stubs

atoum, (*1)

Install it

Install extension using composer:, (*2)

{
    "require-dev": {
        "atoum/stubs": "*"
    }
}

Use it

Once your IDE is correctly configured, the only thing you will have to do is use atoum through one of its alias:, (*3)

<?php

// tests/units/random.php

namespace tests\units;

use atoum; // or mageekguy\atoum

class random extends atoum {
    // ...
}

atoum provides 3 aliases for the main test class, choose the one you prefer:, (*4)

  • atoum
  • atoum\test
  • mageekguy\atoum

Once done, you will get full featured code-completion:, (*5)

atoum-stubs, (*6)

Why?

Why are the PHPdoc annotations part of an external repository?, (*7)

Because we just don't want them in the middle of atoum's source code. It's not really useful there and it adds extra noise., (*8)

Moreover, if we use PHPDoc for the userland API we should also add annotations to every method of the internal API. Too much work for a small amount of added value., (*9)

Why are those annotations only working on atoum aliases?, (*10)

Because we stored annotated code in an external repository, we would have to duplicate some classes to annotate them. Doing so would create duplicate classes and some IDEs will emit warnings., (*11)

We don't want to add extra noise while providing a good code-completion., (*12)

Why not annotating every public method?, (*13)

Because they are not all meaningful in a test context. When you write unit tests with atoum, you will likely never call internal asserters' methods, even if they are public. They provide support for atoum so it can do its job well. But they won't help you in your everyday work., (*14)

Upgrade stubs

bin/updateMissingStubClasses
bin/updateDoc

This will only update existing methods. To add new method you will require to do it manually! Think also to look at the tree of asserters to extends the class properly., (*15)

You probably also need to update classes/mageekguy/atoum/stubs/asserters.php with the new asserter set., (*16)

License

atoum stubs are released under the BSD-3-Clause License. See the bundled LICENSE file for details., (*17)

The Versions

29/01 2018

dev-master

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

Stubs for atoum, the simple modern and intuitive unit testing framework for PHP 5.3+

  Sources   Download

BSD-3-Clause

tdd test unit testing atoum

29/01 2018

2.6.0

2.6.0.0 http://www.atoum.org

Stubs for atoum, the simple modern and intuitive unit testing framework for PHP 5.3+

  Sources   Download

BSD-3-Clause

tdd test unit testing atoum

07/01 2016

2.5.0

2.5.0.0 http://www.atoum.org

Stubs for atoum, the simple modern and intuitive unit testing framework for PHP 5.3+

  Sources   Download

BSD

tdd test unit testing atoum

16/05 2015

2.2.0

2.2.0.0 http://www.atoum.org

Stubs for atoum, the simple modern and intuitive unit testing framework for PHP 5.3+

  Sources   Download

BSD

tdd test unit testing atoum

16/05 2015

2.1.0

2.1.0.0 http://www.atoum.org

Stubs for atoum, the simple modern and intuitive unit testing framework for PHP 5.3+

  Sources   Download

BSD

tdd test unit testing atoum