Skip to content

Commit

Permalink
Merge 76d36f8 into 9dcffcc
Browse files Browse the repository at this point in the history
  • Loading branch information
carusogabriel committed Nov 18, 2017
2 parents 9dcffcc + 76d36f8 commit 9acd836
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 14 deletions.
2 changes: 1 addition & 1 deletion composer.json
Expand Up @@ -9,7 +9,7 @@
"php": ">=5.4.0"
},
"require-dev": {
"phpunit/phpunit": "~4.8"
"phpunit/phpunit": "~4.8.35 || ~5.7 || ~6.4"
},
"autoload": {
"psr-4": {
Expand Down
7 changes: 4 additions & 3 deletions tests/FulfilledPromiseTest.php
Expand Up @@ -37,11 +37,12 @@ public function getPromiseTestAdapter(callable $canceller = null)
]);
}

/** @test */
/**
* @test
* @expectedException InvalidArgumentException
*/
public function shouldThrowExceptionIfConstructedWithAPromise()
{
$this->setExpectedException('\InvalidArgumentException');

return new FulfilledPromise(new FulfilledPromise());
}
}
8 changes: 5 additions & 3 deletions tests/Internal/CancellationQueueTest.php
Expand Up @@ -74,11 +74,13 @@ public function doesNotCallCancelTwiceWhenStartedTwice()
$cancellationQueue();
}

/** @test */
/**
* @test
* @expectedException Exception
* @expectedExceptionMessage test
*/
public function rethrowsExceptionsThrownFromCancel()
{
$this->setExpectedException('\Exception', 'test');

$mock = $this->createCallableMock();
$mock
->expects($this->once())
Expand Down
8 changes: 5 additions & 3 deletions tests/Internal/QueueTest.php
Expand Up @@ -29,11 +29,13 @@ public function excutesNestedEnqueuedTasks()
$queue->enqueue($task);
}

/** @test */
/**
* @test
* @expectedException Exception
* @expectedException test
*/
public function rethrowsExceptionsThrownFromTasks()
{
$this->setExpectedException('\Exception', 'test');

$mock = $this->createCallableMock();
$mock
->expects($this->once())
Expand Down
7 changes: 4 additions & 3 deletions tests/RejectedPromiseTest.php
Expand Up @@ -37,11 +37,12 @@ public function getPromiseTestAdapter(callable $canceller = null)
]);
}

/** @test */
/**
* @test
* @expectedException InvalidArgumentException
*/
public function shouldThrowExceptionIfConstructedWithAPromise()
{
$this->setExpectedException('\InvalidArgumentException');

return new RejectedPromise(new RejectedPromise());
}
}
4 changes: 3 additions & 1 deletion tests/TestCase.php
Expand Up @@ -2,7 +2,9 @@

namespace React\Promise;

class TestCase extends \PHPUnit_Framework_TestCase
use PHPUnit\Framework\TestCase as BaseTestCase;

class TestCase extends BaseTestCase
{
public function expectCallableExactly($amount)
{
Expand Down

0 comments on commit 9acd836

Please sign in to comment.