atoum/atoum — pull request #227 by jubianchi (2013-06-25 22:37:29+00:00)
Title: [WIP] atoum-phpunit bridge

This PR is a work in progress. It aims to implement a bridge allowing atoum to run PHPUnit tests.
Currently, this supports the following from PHPUnit:

## Assertions

assertFalse	assertTrue	assertNull	assertNotNull

assertEquals	assertNotEquals	assertContains	assertNotContains

assertSame	assertInstanceOf	assertNotInstanceof	assertArrayHasKey

assertCount	assertFileExists	assertFileNotExists	assertStringStartsWith

assertAttributeEquals

## Mock

getMock	getMockForAbstractClass	getMockBuilder

### Expectations

expects	any	exactly	once	atLeastOnce	at	never

with	equalTo	identicalTo

### Definition

will	returnValue	returnVallback	onConsecutiveCalls	throwException

So basically, something like that will work with atoum:

```php
getMock('\\Foo\\Bar');
$mock
->expect($this->any())
->method('baz')
->with('arg1', 'arg2')
->will($this->returnValue('returnval'))
;

//...
```

I ported two test suites while writing this:
* Composer
* jubianchi/composer: https://github.com/jubianchi/composer/compare/composer:master...master
* travis builds: https://travis-ci.org/jubianchi/composer
* Twig
* jubianchi/Twig: https://github.com/jubianchi/Twig/compare/fabpot:master...master
* travis builds: https://travis-ci.org/jubianchi/Twig

I'm still working on this as there are some bugs to fix (like the one making composer's build fail on ```5.4``` and ```5.5```)

Feel free to review everything, perhaps test it, and let me know what you think about this tool ;)