Skip to content

Commit d90cf25

Browse files
committed
Fixing risky tests
Makring tests that have no assertions with the annotation to suppress phpunits warning around risky tests closes 1370
1 parent df8857d commit d90cf25

4 files changed

+18
-0
lines changed

Tests/MongodbConsumerTest.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ public function testShouldImplementConsumerInterface()
2525
$this->assertClassImplements(Consumer::class, MongodbConsumer::class);
2626
}
2727

28+
/**
29+
* @doesNotPerformAssertions
30+
*/
2831
public function testCouldBeConstructedWithRequiredArguments()
2932
{
3033
new MongodbConsumer($this->createContextMock(), new MongodbDestination('queue'));
@@ -39,6 +42,9 @@ public function testShouldReturnInstanceOfDestination()
3942
$this->assertSame($destination, $consumer->getQueue());
4043
}
4144

45+
/**
46+
* @doesNotPerformAssertions
47+
*/
4248
public function testCouldCallAcknowledgedMethod()
4349
{
4450
$consumer = new MongodbConsumer($this->createContextMock(), new MongodbDestination('queue'));

Tests/MongodbContextTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ public function testShouldImplementContextInterface()
2929
$this->assertClassImplements(Context::class, MongodbContext::class);
3030
}
3131

32+
/**
33+
* @doesNotPerformAssertions
34+
*/
3235
public function testCouldBeConstructedWithRequiredArguments()
3336
{
3437
new MongodbContext($this->createClientMock());

Tests/MongodbProducerTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ public function testShouldImplementProducerInterface()
2323
$this->assertClassImplements(Producer::class, MongodbProducer::class);
2424
}
2525

26+
/**
27+
* @doesNotPerformAssertions
28+
*/
2629
public function testCouldBeConstructedWithRequiredArguments()
2730
{
2831
new MongodbProducer($this->createContextMock());

Tests/MongodbSubscriptionConsumerTest.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ public function testShouldImplementSubscriptionConsumerInterface()
2424
$this->assertTrue($rc->implementsInterface(SubscriptionConsumer::class));
2525
}
2626

27+
/**
28+
* @doesNotPerformAssertions
29+
*/
2730
public function testCouldBeConstructedWithMongodbContextAsFirstArgument()
2831
{
2932
new MongodbSubscriptionConsumer($this->createMongodbContextMock());
@@ -65,6 +68,9 @@ public function testThrowsIfTrySubscribeAnotherConsumerToAlreadySubscribedQueue(
6568
$subscriptionConsumer->subscribe($barConsumer, $barCallback);
6669
}
6770

71+
/**
72+
* @doesNotPerformAssertions
73+
*/
6874
public function testShouldAllowSubscribeSameConsumerAndCallbackSecondTime()
6975
{
7076
$subscriptionConsumer = new MongodbSubscriptionConsumer($this->createMongodbContextMock());

0 commit comments

Comments
 (0)