Skip to content

Commit eea57f9

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 c7174da commit eea57f9

File tree

6 files changed

+27
-0
lines changed

6 files changed

+27
-0
lines changed

Tests/NullConnectionFactoryTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ public function testShouldImplementConnectionFactoryInterface()
1717
$this->assertClassImplements(ConnectionFactory::class, NullConnectionFactory::class);
1818
}
1919

20+
/**
21+
* @doesNotPerformAssertions
22+
*/
2023
public function testCouldBeConstructedWithoutAnyArguments()
2124
{
2225
new NullConnectionFactory();

Tests/NullConsumerTest.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ public function testShouldImplementMessageConsumerInterface()
1818
$this->assertClassImplements(Consumer::class, NullConsumer::class);
1919
}
2020

21+
/**
22+
* @doesNotPerformAssertions
23+
*/
2124
public function testCouldBeConstructedWithQueueAsArgument()
2225
{
2326
new NullConsumer(new NullQueue('aName'));
@@ -41,13 +44,19 @@ public function testShouldAlwaysReturnNullOnReceiveNoWait()
4144
$this->assertNull($consumer->receiveNoWait());
4245
}
4346

47+
/**
48+
* @doesNotPerformAssertions
49+
*/
4450
public function testShouldDoNothingOnAcknowledge()
4551
{
4652
$consumer = new NullConsumer(new NullQueue('theQueueName'));
4753

4854
$consumer->acknowledge(new NullMessage());
4955
}
5056

57+
/**
58+
* @doesNotPerformAssertions
59+
*/
5160
public function testShouldDoNothingOnReject()
5261
{
5362
$consumer = new NullConsumer(new NullQueue('theQueueName'));

Tests/NullContextTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ public function testShouldImplementSessionInterface()
2121
$this->assertClassImplements(Context::class, NullContext::class);
2222
}
2323

24+
/**
25+
* @doesNotPerformAssertions
26+
*/
2427
public function testCouldBeConstructedWithoutAnyArguments()
2528
{
2629
new NullContext();

Tests/NullProducerTest.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,17 @@ public function testShouldImplementProducerInterface()
1818
$this->assertClassImplements(Producer::class, NullProducer::class);
1919
}
2020

21+
/**
22+
* @doesNotPerformAssertions
23+
*/
2124
public function testCouldBeConstructedWithoutAnyArguments()
2225
{
2326
new NullProducer();
2427
}
2528

29+
/**
30+
* @doesNotPerformAssertions
31+
*/
2632
public function testShouldDoNothingOnSend()
2733
{
2834
$producer = new NullProducer();

Tests/NullQueueTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ public function testShouldImplementQueueInterface()
1616
$this->assertClassImplements(Queue::class, NullQueue::class);
1717
}
1818

19+
/**
20+
* @doesNotPerformAssertions
21+
*/
1922
public function testCouldBeConstructedWithNameAsArgument()
2023
{
2124
new NullQueue('aName');

Tests/NullTopicTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ public function testShouldImplementTopicInterface()
1616
$this->assertClassImplements(Topic::class, NullTopic::class);
1717
}
1818

19+
/**
20+
* @doesNotPerformAssertions
21+
*/
1922
public function testCouldBeConstructedWithNameAsArgument()
2023
{
2124
new NullTopic('aName');

0 commit comments

Comments
 (0)