Skip to content

Commit 3ef3206

Browse files
committed
Removing constructor tests
Removing all tests that creates a new instance but doesn't call any methods nor preform any assertions.
1 parent 82d23fb commit 3ef3206

File tree

58 files changed

+0
-507
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

+0
-507
lines changed

Tests/ArrayProcessorRegistryTest.php

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

21-
/**
22-
* @doesNotPerformAssertions
23-
*/
24-
public function testCouldBeConstructedWithoutAnyArgument()
25-
{
26-
new ArrayProcessorRegistry();
27-
}
28-
2921
public function testShouldThrowExceptionIfProcessorIsNotSet()
3022
{
3123
$registry = new ArrayProcessorRegistry();

Tests/Client/ChainExtensionTest.php

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

32-
/**
33-
* @doesNotPerformAssertions
34-
*/
35-
public function testCouldBeConstructedWithExtensionsArray()
36-
{
37-
new ChainExtension([$this->createExtension(), $this->createExtension()]);
38-
}
39-
4032
public function testThrowIfArrayContainsNotExtension()
4133
{
4234
$this->expectException(\LogicException::class);

Tests/Client/ConsumptionExtension/DelayRedeliveredMessageExtensionTest.php

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

2424
class DelayRedeliveredMessageExtensionTest extends TestCase
2525
{
26-
/**
27-
* @doesNotPerformAssertions
28-
*/
29-
public function testCouldBeConstructedWithRequiredArguments()
30-
{
31-
new DelayRedeliveredMessageExtension($this->createDriverMock(), 12345);
32-
}
3326

3427
public function testShouldSendDelayedMessageAndRejectOriginalMessage()
3528
{

Tests/Client/ConsumptionExtension/ExclusiveCommandExtensionTest.php

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

37-
/**
38-
* @doesNotPerformAssertions
39-
*/
40-
public function testCouldBeConstructedWithDriverAsFirstArgument()
41-
{
42-
new ExclusiveCommandExtension($this->createDriverStub());
43-
}
44-
4537
public function testShouldDoNothingIfMessageHasTopicPropertySetOnPreReceive()
4638
{
4739
$message = new NullMessage();

Tests/Client/ConsumptionExtension/FlushSpoolProducerExtensionTest.php

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

33-
/**
34-
* @doesNotPerformAssertions
35-
*/
36-
public function testCouldBeConstructedWithSpoolProducerAsFirstArgument()
37-
{
38-
new FlushSpoolProducerExtension($this->createSpoolProducerMock());
39-
}
40-
4133
public function testShouldFlushSpoolProducerOnEnd()
4234
{
4335
$producer = $this->createSpoolProducerMock();

Tests/Client/ConsumptionExtension/LogExtensionTest.php

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

58-
/**
59-
* @doesNotPerformAssertions
60-
*/
61-
public function testCouldBeConstructedWithoutAnyArguments()
62-
{
63-
new LogExtension();
64-
}
65-
6658
public function testShouldLogStartOnStart()
6759
{
6860
$logger = $this->createLogger();

Tests/Client/ConsumptionExtension/SetRouterPropertiesExtensionTest.php

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

30-
/**
31-
* @doesNotPerformAssertions
32-
*/
33-
public function testCouldBeConstructedWithRequiredArguments()
34-
{
35-
new SetRouterPropertiesExtension($this->createDriverMock());
36-
}
37-
3830
public function testShouldSetRouterProcessorPropertyIfNotSetAndOnRouterQueue()
3931
{
4032
$config = Config::create('test', '.', '', '', 'router-queue', '', 'router-processor-name');

Tests/Client/ConsumptionExtension/SetupBrokerExtensionTest.php

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

24-
/**
25-
* @doesNotPerformAssertions
26-
*/
27-
public function testCouldBeConstructedWithRequiredArguments()
28-
{
29-
new SetupBrokerExtension($this->createDriverMock());
30-
}
31-
3224
public function testShouldSetupBroker()
3325
{
3426
$logger = new NullLogger();

Tests/Client/DelegateProcessorTest.php

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

1414
class DelegateProcessorTest extends TestCase
1515
{
16-
/**
17-
* @doesNotPerformAssertions
18-
*/
19-
public function testCouldBeConstructedWithRequiredArguments()
20-
{
21-
new DelegateProcessor($this->createProcessorRegistryMock());
22-
}
23-
2416
public function testShouldThrowExceptionIfProcessorNameIsNotSet()
2517
{
2618
$this->expectException(\LogicException::class);

Tests/Client/DriverFactoryTest.php

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

64-
/**
65-
* @doesNotPerformAssertions
66-
*/
67-
public function testCouldBeConstructedWithoutAnyArguments()
68-
{
69-
new DriverFactory();
70-
}
71-
7264
public function testThrowIfPackageThatSupportSchemeNotInstalled()
7365
{
7466
$scheme = 'scheme5b7aa7d7cd213';

Tests/Client/DriverPreSendTest.php

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

22-
/**
23-
* @doesNotPerformAssertions
24-
*/
25-
public function testCouldBeConstructedWithExpectedArguments()
26-
{
27-
new DriverPreSend(
28-
new Message(),
29-
$this->createProducerMock(),
30-
$this->createDriverMock()
31-
);
32-
}
33-
3422
public function testShouldAllowGetArgumentSetInConstructor()
3523
{
3624
$expectedMessage = new Message();

Tests/Client/Extension/PrepareBodyExtensionTest.php

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

25-
/**
26-
* @doesNotPerformAssertions
27-
*/
28-
public function testCouldConstructedWithoutAnyArguments()
29-
{
30-
new PrepareBodyExtension();
31-
}
32-
3325
/**
3426
* @dataProvider provideMessages
3527
*

Tests/Client/PostSendTest.php

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

24-
/**
25-
* @doesNotPerformAssertions
26-
*/
27-
public function testCouldBeConstructedWithExpectedArguments()
28-
{
29-
new PostSend(
30-
new Message(),
31-
$this->createProducerMock(),
32-
$this->createDriverMock(),
33-
$this->createDestinationMock(),
34-
$this->createTransportMessageMock()
35-
);
36-
}
37-
3824
public function testShouldAllowGetArgumentSetInConstructor()
3925
{
4026
$expectedMessage = new Message();

Tests/Client/PreSendTest.php

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

21-
/**
22-
* @doesNotPerformAssertions
23-
*/
24-
public function testCouldBeConstructedWithExpectedArguments()
25-
{
26-
new PreSend(
27-
'aCommandOrTopic',
28-
new Message(),
29-
$this->createProducerMock(),
30-
$this->createDriverMock()
31-
);
32-
}
33-
3421
public function testShouldAllowGetArgumentSetInConstructor()
3522
{
3623
$expectedCommandOrTopic = 'theCommandOrTopic';

Tests/Client/ProducerTest.php

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

27-
/**
28-
* @doesNotPerformAssertions
29-
*/
30-
public function testCouldBeConstructedWithRequiredArguments()
31-
{
32-
new Producer($this->createDriverMock(), $this->createRpcFactoryMock());
33-
}
34-
35-
/**
36-
* @doesNotPerformAssertions
37-
*/
38-
public function testCouldBeConstructedWithOptionalArguments()
39-
{
40-
new Producer(
41-
$this->createDriverMock(),
42-
$this->createRpcFactoryMock(),
43-
$this->createMock(ExtensionInterface::class)
44-
);
45-
}
46-
4727
/**
4828
* @return \PHPUnit\Framework\MockObject\MockObject
4929
*/

Tests/Client/SpoolProducerTest.php

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

21-
/**
22-
* @doesNotPerformAssertions
23-
*/
24-
public function testCouldBeConstructedWithRealProducer()
25-
{
26-
new SpoolProducer($this->createProducerMock());
27-
}
28-
2921
public function testShouldQueueEventMessageOnSend()
3022
{
3123
$message = new Message();

Tests/Client/TraceableProducerTest.php

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

21-
/**
22-
* @doesNotPerformAssertions
23-
*/
24-
public function testCouldBeConstructedWithInternalMessageProducer()
25-
{
26-
new TraceableProducer($this->createProducerMock());
27-
}
28-
2921
public function testShouldPassAllArgumentsToInternalEventMessageProducerSendMethod()
3022
{
3123
$topic = 'theTopic';

Tests/ConnectionFactoryFactoryTest.php

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

40-
/**
41-
* @doesNotPerformAssertions
42-
*/
43-
public function testCouldBeConstructedWithoutAnyArguments()
44-
{
45-
new ConnectionFactoryFactory();
46-
}
47-
4840
/**
4941
* @doesNotPerformAssertions
5042
*/

Tests/Consumption/CallbackProcessorTest.php

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

21-
/**
22-
* @doesNotPerformAssertions
23-
*/
24-
public function testCouldBeConstructedWithCallableAsArgument()
25-
{
26-
new CallbackProcessor(function () {
27-
});
28-
}
29-
3021
public function testShouldCallCallbackAndProxyItsReturnedValue()
3122
{
3223
$expectedMessage = new NullMessage();

Tests/Consumption/ChainExtensionTest.php

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

36-
/**
37-
* @doesNotPerformAssertions
38-
*/
39-
public function testCouldBeConstructedWithExtensionsArray()
40-
{
41-
new ChainExtension([$this->createExtension(), $this->createExtension()]);
42-
}
43-
4436
public function testShouldProxyOnInitLoggerToAllInternalExtensions()
4537
{
4638
$context = new InitLogger(new NullLogger());

Tests/Consumption/Exception/IllegalContextModificationExceptionTest.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,4 @@ public function testShouldExtendLogicException()
2020
{
2121
$this->assertClassExtends(\LogicException::class, IllegalContextModificationException::class);
2222
}
23-
24-
/**
25-
* @doesNotPerformAssertions
26-
*/
27-
public function testCouldBeConstructedWithoutAnyArguments()
28-
{
29-
new IllegalContextModificationException();
30-
}
3123
}

Tests/Consumption/Exception/InvalidArgumentExceptionTest.php

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

24-
/**
25-
* @doesNotPerformAssertions
26-
*/
27-
public function testCouldBeConstructedWithoutAnyArguments()
28-
{
29-
new InvalidArgumentException();
30-
}
31-
3224
public function testThrowIfAssertInstanceOfNotSameAsExpected()
3325
{
3426
$this->expectException(InvalidArgumentException::class);

Tests/Consumption/Exception/LogicExceptionTest.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,4 @@ public function testShouldExtendLogicException()
2020
{
2121
$this->assertClassExtends(\LogicException::class, LogicException::class);
2222
}
23-
24-
/**
25-
* @doesNotPerformAssertions
26-
*/
27-
public function testCouldBeConstructedWithoutAnyArguments()
28-
{
29-
new LogicException();
30-
}
3123
}

Tests/Consumption/Extension/LimitConsumedMessagesExtensionTest.php

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

1717
class LimitConsumedMessagesExtensionTest extends TestCase
1818
{
19-
/**
20-
* @doesNotPerformAssertions
21-
*/
22-
public function testCouldBeConstructedWithRequiredArguments()
23-
{
24-
new LimitConsumedMessagesExtension(12345);
25-
}
26-
2719
public function testOnPreConsumeShouldInterruptWhenLimitIsReached()
2820
{
2921
$logger = $this->createLoggerMock();

Tests/Consumption/Extension/LimitConsumerMemoryExtensionTest.php

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

1818
class LimitConsumerMemoryExtensionTest extends TestCase
1919
{
20-
/**
21-
* @doesNotPerformAssertions
22-
*/
23-
public function testCouldBeConstructedWithRequiredArguments()
24-
{
25-
new LimitConsumerMemoryExtension(12345);
26-
}
27-
2820
public function testShouldThrowExceptionIfMemoryLimitIsNotInt()
2921
{
3022
$this->expectException(\InvalidArgumentException::class);

0 commit comments

Comments
 (0)