1
0
mirror of https://github.com/danog/amp.git synced 2024-11-27 12:35:02 +01:00
amp/test/SuccessTest.php
2014-12-01 19:45:57 -05:00

18 lines
386 B
PHP

<?php
namespace Amp\Test;
use Amp\Success;
class SuccessTest extends \PHPUnit_Framework_TestCase {
public function testWhenInvokedImmediately() {
$value = 42;
$success = new Success($value);
$success->when(function($error, $result) use ($value) {
$this->assertNull($error);
$this->assertSame($value, $result);
});
}
}