Skip to content

Commit 342a346

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 7aa6f64 commit 342a346

File tree

5 files changed

+21
-0
lines changed

5 files changed

+21
-0
lines changed

Tests/RedisConsumerTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ public function testShouldImplementConsumerInterface()
2222
$this->assertClassImplements(Consumer::class, RedisConsumer::class);
2323
}
2424

25+
/**
26+
* @doesNotPerformAssertions
27+
*/
2528
public function testCouldBeConstructedWithContextAndDestinationAndPreFetchCountAsArguments()
2629
{
2730
new RedisConsumer($this->createContextMock(), new RedisDestination('aQueue'));

Tests/RedisContextTest.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,17 @@ public function testShouldImplementContextInterface()
2525
$this->assertClassImplements(Context::class, RedisContext::class);
2626
}
2727

28+
/**
29+
* @doesNotPerformAssertions
30+
*/
2831
public function testCouldBeConstructedWithRedisAsFirstArgument()
2932
{
3033
new RedisContext($this->createRedisMock(), 300);
3134
}
3235

36+
/**
37+
* @doesNotPerformAssertions
38+
*/
3339
public function testCouldBeConstructedWithRedisFactoryAsFirstArgument()
3440
{
3541
new RedisContext(function () {

Tests/RedisProducerTest.php

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

28+
/**
29+
* @doesNotPerformAssertions
30+
*/
2831
public function testCouldBeConstructedWithRedisAsFirstArgument()
2932
{
3033
new RedisProducer($this->createContextMock());

Tests/RedisSubscriptionConsumerTest.php

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

25+
/**
26+
* @doesNotPerformAssertions
27+
*/
2528
public function testCouldBeConstructedWithRedisContextAsFirstArgument()
2629
{
2730
new RedisSubscriptionConsumer($this->createRedisContextMock());
@@ -63,6 +66,9 @@ public function testThrowsIfTrySubscribeAnotherConsumerToAlreadySubscribedQueue(
6366
$subscriptionConsumer->subscribe($barConsumer, $barCallback);
6467
}
6568

69+
/**
70+
* @doesNotPerformAssertions
71+
*/
6672
public function testShouldAllowSubscribeSameConsumerAndCallbackSecondTime()
6773
{
6874
$subscriptionConsumer = new RedisSubscriptionConsumer($this->createRedisContextMock());

Tests/Spec/JsonSerializerTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ public function testShouldImplementSerializerInterface()
2020
$this->assertClassImplements(Serializer::class, JsonSerializer::class);
2121
}
2222

23+
/**
24+
* @doesNotPerformAssertions
25+
*/
2326
public function testCouldBeConstructedWithoutAnyArguments()
2427
{
2528
new JsonSerializer();

0 commit comments

Comments
 (0)