Skip to content

Commit 82d23fb

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 5d37d8b commit 82d23fb

File tree

58 files changed

+195
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+195
-0
lines changed

Tests/ArrayProcessorRegistryTest.php

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

21+
/**
22+
* @doesNotPerformAssertions
23+
*/
2124
public function testCouldBeConstructedWithoutAnyArgument()
2225
{
2326
new ArrayProcessorRegistry();

Tests/Client/ChainExtensionTest.php

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

32+
/**
33+
* @doesNotPerformAssertions
34+
*/
3235
public function testCouldBeConstructedWithExtensionsArray()
3336
{
3437
new ChainExtension([$this->createExtension(), $this->createExtension()]);

Tests/Client/ConsumptionExtension/DelayRedeliveredMessageExtensionTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@
2323

2424
class DelayRedeliveredMessageExtensionTest extends TestCase
2525
{
26+
/**
27+
* @doesNotPerformAssertions
28+
*/
2629
public function testCouldBeConstructedWithRequiredArguments()
2730
{
2831
new DelayRedeliveredMessageExtension($this->createDriverMock(), 12345);

Tests/Client/ConsumptionExtension/ExclusiveCommandExtensionTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ public function testShouldBeFinal()
3434
$this->assertClassFinal(ExclusiveCommandExtension::class);
3535
}
3636

37+
/**
38+
* @doesNotPerformAssertions
39+
*/
3740
public function testCouldBeConstructedWithDriverAsFirstArgument()
3841
{
3942
new ExclusiveCommandExtension($this->createDriverStub());

Tests/Client/ConsumptionExtension/FlushSpoolProducerExtensionTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ public function testShouldImplementEndExtensionInterface()
3030
$this->assertClassImplements(EndExtensionInterface::class, FlushSpoolProducerExtension::class);
3131
}
3232

33+
/**
34+
* @doesNotPerformAssertions
35+
*/
3336
public function testCouldBeConstructedWithSpoolProducerAsFirstArgument()
3437
{
3538
new FlushSpoolProducerExtension($this->createSpoolProducerMock());

Tests/Client/ConsumptionExtension/LogExtensionTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ public function testShouldSubClassOfLogExtension()
5555
$this->assertClassExtends(\Enqueue\Consumption\Extension\LogExtension::class, LogExtension::class);
5656
}
5757

58+
/**
59+
* @doesNotPerformAssertions
60+
*/
5861
public function testCouldBeConstructedWithoutAnyArguments()
5962
{
6063
new LogExtension();

Tests/Client/ConsumptionExtension/SetRouterPropertiesExtensionTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ public function testShouldImplementMessageReceivedExtensionInterface()
2727
$this->assertClassImplements(MessageReceivedExtensionInterface::class, SetRouterPropertiesExtension::class);
2828
}
2929

30+
/**
31+
* @doesNotPerformAssertions
32+
*/
3033
public function testCouldBeConstructedWithRequiredArguments()
3134
{
3235
new SetRouterPropertiesExtension($this->createDriverMock());

Tests/Client/ConsumptionExtension/SetupBrokerExtensionTest.php

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

24+
/**
25+
* @doesNotPerformAssertions
26+
*/
2427
public function testCouldBeConstructedWithRequiredArguments()
2528
{
2629
new SetupBrokerExtension($this->createDriverMock());

Tests/Client/DelegateProcessorTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313

1414
class DelegateProcessorTest extends TestCase
1515
{
16+
/**
17+
* @doesNotPerformAssertions
18+
*/
1619
public function testCouldBeConstructedWithRequiredArguments()
1720
{
1821
new DelegateProcessor($this->createProcessorRegistryMock());

Tests/Client/DriverFactoryTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ public function testShouldBeFinal()
6161
$this->assertTrue($rc->isFinal());
6262
}
6363

64+
/**
65+
* @doesNotPerformAssertions
66+
*/
6467
public function testCouldBeConstructedWithoutAnyArguments()
6568
{
6669
new DriverFactory();

Tests/Client/DriverPreSendTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ public function testShouldBeFinal()
1919
self::assertClassFinal(DriverPreSend::class);
2020
}
2121

22+
/**
23+
* @doesNotPerformAssertions
24+
*/
2225
public function testCouldBeConstructedWithExpectedArguments()
2326
{
2427
new DriverPreSend(

Tests/Client/Extension/PrepareBodyExtensionTest.php

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

25+
/**
26+
* @doesNotPerformAssertions
27+
*/
2528
public function testCouldConstructedWithoutAnyArguments()
2629
{
2730
new PrepareBodyExtension();

Tests/Client/PostSendTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ public function testShouldBeFinal()
2121
self::assertClassFinal(PostSend::class);
2222
}
2323

24+
/**
25+
* @doesNotPerformAssertions
26+
*/
2427
public function testCouldBeConstructedWithExpectedArguments()
2528
{
2629
new PostSend(

Tests/Client/PreSendTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ public function testShouldBeFinal()
1818
self::assertClassFinal(PreSend::class);
1919
}
2020

21+
/**
22+
* @doesNotPerformAssertions
23+
*/
2124
public function testCouldBeConstructedWithExpectedArguments()
2225
{
2326
new PreSend(

Tests/Client/ProducerTest.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,17 @@ public function testShouldBeFinal()
2424
self::assertClassFinal(Producer::class);
2525
}
2626

27+
/**
28+
* @doesNotPerformAssertions
29+
*/
2730
public function testCouldBeConstructedWithRequiredArguments()
2831
{
2932
new Producer($this->createDriverMock(), $this->createRpcFactoryMock());
3033
}
3134

35+
/**
36+
* @doesNotPerformAssertions
37+
*/
3238
public function testCouldBeConstructedWithOptionalArguments()
3339
{
3440
new Producer(

Tests/Client/SpoolProducerTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ public function testShouldImplementProducerInterface()
1818
self::assertClassImplements(ProducerInterface::class, SpoolProducer::class);
1919
}
2020

21+
/**
22+
* @doesNotPerformAssertions
23+
*/
2124
public function testCouldBeConstructedWithRealProducer()
2225
{
2326
new SpoolProducer($this->createProducerMock());

Tests/Client/TraceableProducerTest.php

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

21+
/**
22+
* @doesNotPerformAssertions
23+
*/
2124
public function testCouldBeConstructedWithInternalMessageProducer()
2225
{
2326
new TraceableProducer($this->createProducerMock());

Tests/ConnectionFactoryFactoryTest.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,18 +37,27 @@ public function testShouldBeFinal()
3737
$this->assertTrue($rc->isFinal());
3838
}
3939

40+
/**
41+
* @doesNotPerformAssertions
42+
*/
4043
public function testCouldBeConstructedWithoutAnyArguments()
4144
{
4245
new ConnectionFactoryFactory();
4346
}
4447

48+
/**
49+
* @doesNotPerformAssertions
50+
*/
4551
public function testShouldAcceptStringDSN()
4652
{
4753
$factory = new ConnectionFactoryFactory();
4854

4955
$factory->create('null:');
5056
}
5157

58+
/**
59+
* @doesNotPerformAssertions
60+
*/
5261
public function testShouldAcceptArrayWithDsnKey()
5362
{
5463
$factory = new ConnectionFactoryFactory();

Tests/Consumption/CallbackProcessorTest.php

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

21+
/**
22+
* @doesNotPerformAssertions
23+
*/
2124
public function testCouldBeConstructedWithCallableAsArgument()
2225
{
2326
new CallbackProcessor(function () {

Tests/Consumption/ChainExtensionTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ public function testShouldImplementExtensionInterface()
3333
$this->assertClassImplements(ExtensionInterface::class, ChainExtension::class);
3434
}
3535

36+
/**
37+
* @doesNotPerformAssertions
38+
*/
3639
public function testCouldBeConstructedWithExtensionsArray()
3740
{
3841
new ChainExtension([$this->createExtension(), $this->createExtension()]);

Tests/Consumption/Exception/IllegalContextModificationExceptionTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ public function testShouldExtendLogicException()
2121
$this->assertClassExtends(\LogicException::class, IllegalContextModificationException::class);
2222
}
2323

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

Tests/Consumption/Exception/InvalidArgumentExceptionTest.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ public function testShouldExtendLogicException()
2121
$this->assertClassExtends(\LogicException::class, InvalidArgumentException::class);
2222
}
2323

24+
/**
25+
* @doesNotPerformAssertions
26+
*/
2427
public function testCouldBeConstructedWithoutAnyArguments()
2528
{
2629
new InvalidArgumentException();
@@ -36,6 +39,9 @@ public function testThrowIfAssertInstanceOfNotSameAsExpected()
3639
InvalidArgumentException::assertInstanceOf(new \SplStack(), \SplQueue::class);
3740
}
3841

42+
/**
43+
* @doesNotPerformAssertions
44+
*/
3945
public function testShouldDoNothingIfAssertDestinationInstanceOfSameAsExpected()
4046
{
4147
InvalidArgumentException::assertInstanceOf(new \SplQueue(), \SplQueue::class);

Tests/Consumption/Exception/LogicExceptionTest.php

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

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

Tests/Consumption/Extension/LimitConsumedMessagesExtensionTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616

1717
class LimitConsumedMessagesExtensionTest extends TestCase
1818
{
19+
/**
20+
* @doesNotPerformAssertions
21+
*/
1922
public function testCouldBeConstructedWithRequiredArguments()
2023
{
2124
new LimitConsumedMessagesExtension(12345);

Tests/Consumption/Extension/LimitConsumerMemoryExtensionTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717

1818
class LimitConsumerMemoryExtensionTest extends TestCase
1919
{
20+
/**
21+
* @doesNotPerformAssertions
22+
*/
2023
public function testCouldBeConstructedWithRequiredArguments()
2124
{
2225
new LimitConsumerMemoryExtension(12345);

Tests/Consumption/Extension/LimitConsumptionTimeExtensionTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717

1818
class LimitConsumptionTimeExtensionTest extends TestCase
1919
{
20+
/**
21+
* @doesNotPerformAssertions
22+
*/
2023
public function testCouldBeConstructedWithRequiredArguments()
2124
{
2225
new LimitConsumptionTimeExtension(new \DateTime('+1 day'));

Tests/Consumption/Extension/LogExtensionTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ public function testShouldImplementPostMessageReceivedExtensionInterface()
4949
$this->assertClassImplements(PostMessageReceivedExtensionInterface::class, LogExtension::class);
5050
}
5151

52+
/**
53+
* @doesNotPerformAssertions
54+
*/
5255
public function testCouldBeConstructedWithoutAnyArguments()
5356
{
5457
new LogExtension();

Tests/Consumption/Extension/LoggerExtensionTest.php

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

23+
/**
24+
* @doesNotPerformAssertions
25+
*/
2326
public function testCouldBeConstructedWithLoggerAsFirstArgument()
2427
{
2528
new LoggerExtension($this->createLogger());

Tests/Consumption/Extension/NicenessExtensionTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111

1212
class NicenessExtensionTest extends TestCase
1313
{
14+
/**
15+
* @doesNotPerformAssertions
16+
*/
1417
public function testCouldBeConstructedWithRequiredArguments()
1518
{
1619
new NicenessExtension(0);

Tests/Consumption/Extension/ReplyExtensionTest.php

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

28+
/**
29+
* @doesNotPerformAssertions
30+
*/
2831
public function testCouldBeConstructedWithoutAnyArguments()
2932
{
3033
new ReplyExtension();

Tests/Consumption/FallbackSubscriptionConsumerTest.php

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

24+
/**
25+
* @doesNotPerformAssertions
26+
*/
2427
public function testCouldBeConstructedWithoutAnyArguments()
2528
{
2629
new FallbackSubscriptionConsumer();
@@ -69,6 +72,9 @@ public function testThrowsIfTrySubscribeAnotherConsumerToAlreadySubscribedQueue(
6972
$subscriptionConsumer->subscribe($barConsumer, $barCallback);
7073
}
7174

75+
/**
76+
* @doesNotPerformAssertions
77+
*/
7278
public function testShouldAllowSubscribeSameConsumerAndCallbackSecondTime()
7379
{
7480
$subscriptionConsumer = new FallbackSubscriptionConsumer();

Tests/Consumption/QueueConsumerTest.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,25 @@ class QueueConsumerTest extends TestCase
3939
{
4040
use ReadAttributeTrait;
4141

42+
/**
43+
* @doesNotPerformAssertions
44+
*/
4245
public function testCouldBeConstructedWithAllArguments()
4346
{
4447
new QueueConsumer($this->createContextStub(), null, [], null, 0);
4548
}
4649

50+
/**
51+
* @doesNotPerformAssertions
52+
*/
4753
public function testCouldBeConstructedWithContextOnly()
4854
{
4955
new QueueConsumer($this->createContextStub());
5056
}
5157

58+
/**
59+
* @doesNotPerformAssertions
60+
*/
5261
public function testCouldBeConstructedWithContextAndSingleExtension()
5362
{
5463
new QueueConsumer($this->createContextStub(), $this->createExtension());

Tests/Router/RouteRecipientListProcessorTest.php

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

26+
/**
27+
* @doesNotPerformAssertions
28+
*/
2629
public function testCouldBeConstructedWithRouterAsFirstArgument()
2730
{
2831
new RouteRecipientListProcessor($this->createRecipientListRouterMock());

0 commit comments

Comments
 (0)