Open menu icon N-ARY CIRCLED PLUS OPERATOR
atoum

Release 3.1.0

@Grummfy - 18 Jul 2017

We are proud to announce the availability of atoum 3.1.0!

Stats

What’s new

Several new feature and a bug fix came with this release.

Things related to PHP next version 7.1 & 7.2 to let atoum be ready for the next version of PHP:

  • The mock generator can now manage nullable type and handle the void type
  • The mock generator support strict types
  • The object asserter has been renamed to phpObject to avoid issue related to reserved words in PHP 7.2 but with an alias to keep the compatibility and avoid any change in the day-to-day usage

Assertions & asserters

Exception

Now the asserter on exception has an isInstanceOf that can be used assertions without brackets.

Stream

Now the asserter on stream has a isRead and isWritten that can be used assertions without brackets.

$this
    ->given($streamController = \atoum\mock\stream::get())
    ->if(file_get_contents($streamController->getPath()))
    ->then()
        ->stream($streamController)
            ->isRead();

// is now the same as
$this
    ->given($streamController = \atoum\mock\stream::get())
    ->if(file_get_contents($streamController->getPath()))
    ->then()
        ->stream($streamController)
            ->isRead;

Example is comming from the documentation.

Documentation

Since the last revision, a lot of improvements on mock usage and on configuration have been made. Several asserter and assertion have been added like for the resources, stream, generator or the constant.

You can see more on the Change list.