Skip to content

Commit 4c232c2

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 a2177a5 commit 4c232c2

File tree

120 files changed

+0
-1046
lines changed

Some content is hidden

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

120 files changed

+0
-1046
lines changed

pkg/amqp-bunny/Tests/AmqpConsumerTest.php

-8
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,6 @@ public function testShouldImplementConsumerInterface()
2727
$this->assertClassImplements(Consumer::class, AmqpConsumer::class);
2828
}
2929

30-
/**
31-
* @doesNotPerformAssertions
32-
*/
33-
public function testCouldBeConstructedWithContextAndQueueAsArguments()
34-
{
35-
new AmqpConsumer($this->createContextMock(), new AmqpQueue('aName'));
36-
}
37-
3830
public function testShouldReturnQueue()
3931
{
4032
$queue = new AmqpQueue('aName');

pkg/amqp-bunny/Tests/AmqpProducerTest.php

-9
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,6 @@ class AmqpProducerTest extends TestCase
2424
{
2525
use ClassExtensionTrait;
2626

27-
/**
28-
* @doesNotPerformAssertions
29-
*/
30-
31-
public function testCouldBeConstructedWithRequiredArguments()
32-
{
33-
new AmqpProducer($this->createBunnyChannelMock(), $this->createContextMock());
34-
}
35-
3627
public function testShouldImplementQueueInteropProducerInterface()
3728
{
3829
$this->assertClassImplements(Producer::class, AmqpProducer::class);

pkg/amqp-bunny/Tests/AmqpSubscriptionConsumerTest.php

-8
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,6 @@ public function testShouldImplementQueueInteropSubscriptionConsumerInterface()
1717
$this->assertTrue($rc->implementsInterface(SubscriptionConsumer::class));
1818
}
1919

20-
/**
21-
* @doesNotPerformAssertions
22-
*/
23-
public function testCouldBeConstructedWithAmqpContextAsFirstArgument()
24-
{
25-
new AmqpSubscriptionConsumer($this->createAmqpContextMock());
26-
}
27-
2820
/**
2921
* @return AmqpContext|MockObject
3022
*/

pkg/amqp-ext/Tests/AmqpConsumerTest.php

-8
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,6 @@ public function testShouldImplementConsumerInterface()
1919
$this->assertClassImplements(Consumer::class, AmqpConsumer::class);
2020
}
2121

22-
/**
23-
* @doesNotPerformAssertions
24-
*/
25-
public function testCouldBeConstructedWithContextAndQueueAsArguments()
26-
{
27-
new AmqpConsumer($this->createContext(), new AmqpQueue('aName'));
28-
}
29-
3022
/**
3123
* @return MockObject|AmqpContext
3224
*/

pkg/amqp-ext/Tests/AmqpContextTest.php

-18
Original file line numberDiff line numberDiff line change
@@ -28,24 +28,6 @@ public function testShouldImplementQueueInteropContextInterface()
2828
$this->assertClassImplements(Context::class, AmqpContext::class);
2929
}
3030

31-
/**
32-
* @doesNotPerformAssertions
33-
*/
34-
public function testCouldBeConstructedWithExtChannelAsFirstArgument()
35-
{
36-
new AmqpContext($this->createExtChannelMock());
37-
}
38-
39-
/**
40-
* @doesNotPerformAssertions
41-
*/
42-
public function testCouldBeConstructedWithExtChannelCallbackFactoryAsFirstArgument()
43-
{
44-
new AmqpContext(function () {
45-
return $this->createExtChannelMock();
46-
});
47-
}
48-
4931
public function testThrowIfNeitherCallbackNorExtChannelAsFirstArgument()
5032
{
5133
$this->expectException(\InvalidArgumentException::class);

pkg/amqp-ext/Tests/AmqpSubscriptionConsumerTest.php

-8
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,6 @@ public function testShouldImplementQueueInteropSubscriptionConsumerInterface()
1717
$this->assertTrue($rc->implementsInterface(SubscriptionConsumer::class));
1818
}
1919

20-
/**
21-
* @doesNotPerformAssertions
22-
*/
23-
public function testCouldBeConstructedWithAmqpContextAsFirstArgument()
24-
{
25-
new AmqpSubscriptionConsumer($this->createAmqpContextMock());
26-
}
27-
2820
/**
2921
* @return AmqpContext|MockObject
3022
*/

pkg/async-event-dispatcher/Tests/AsyncProcessorTest.php

-8
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,6 @@ public function testShouldImplementProcessorInterface()
2424
$this->assertClassImplements(Processor::class, AsyncProcessor::class);
2525
}
2626

27-
/**
28-
* @doesNotPerformAssertions
29-
*/
30-
public function testCouldBeConstructedWithRegistryAndProxyEventDispatcher()
31-
{
32-
new AsyncProcessor($this->createRegistryMock(), $this->createProxyEventDispatcherMock());
33-
}
34-
3527
public function testRejectIfMessageMissingEventNameProperty()
3628
{
3729
$processor = new AsyncProcessor($this->createRegistryMock(), $this->createProxyEventDispatcherMock());

pkg/async-event-dispatcher/Tests/PhpSerializerEventTransformerTest.php

-8
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,6 @@ public function testShouldImplementEventTransformerInterface()
2121
$this->assertClassImplements(EventTransformer::class, PhpSerializerEventTransformer::class);
2222
}
2323

24-
/**
25-
* @doesNotPerformAssertions
26-
*/
27-
public function testCouldBeConstructedWithoutAnyArguments()
28-
{
29-
new PhpSerializerEventTransformer($this->createContextStub());
30-
}
31-
3224
public function testShouldReturnMessageWithPhpSerializedEventAsBodyOnToMessage()
3325
{
3426
$transformer = new PhpSerializerEventTransformer($this->createContextStub());

pkg/async-event-dispatcher/Tests/SimpleRegistryTest.php

-8
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,6 @@ public function testShouldImplementRegistryInterface()
1818
$this->assertClassImplements(Registry::class, SimpleRegistry::class);
1919
}
2020

21-
/**
22-
* @doesNotPerformAssertions
23-
*/
24-
public function testCouldBeConstructedWithEventsMapAndTransformersMapAsArguments()
25-
{
26-
new SimpleRegistry([], []);
27-
}
28-
2921
public function testShouldAllowGetTransportNameByEventName()
3022
{
3123
$registry = new SimpleRegistry([

pkg/dbal/Tests/DbalConsumerTest.php

-8
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,6 @@ public function testShouldImplementConsumerInterface()
2828
$this->assertClassImplements(Consumer::class, DbalConsumer::class);
2929
}
3030

31-
/**
32-
* @doesNotPerformAssertions
33-
*/
34-
public function testCouldBeConstructedWithRequiredArguments()
35-
{
36-
new DbalConsumer($this->createContextMock(), new DbalDestination('queue'));
37-
}
38-
3931
public function testShouldReturnInstanceOfDestination()
4032
{
4133
$destination = new DbalDestination('queue');

pkg/dbal/Tests/DbalContextTest.php

-8
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,6 @@ public function testShouldImplementContextInterface()
2727
$this->assertClassImplements(Context::class, DbalContext::class);
2828
}
2929

30-
/**
31-
* @doesNotPerformAssertions
32-
*/
33-
public function testCouldBeConstructedWithRequiredArguments()
34-
{
35-
new DbalContext($this->createConnectionMock());
36-
}
37-
3830
public function testCouldBeConstructedWithEmptyConfiguration()
3931
{
4032
$factory = new DbalContext($this->createConnectionMock(), []);

pkg/dbal/Tests/DbalProducerTest.php

-8
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,6 @@ public function testShouldImplementProducerInterface()
2121
$this->assertClassImplements(Producer::class, DbalProducer::class);
2222
}
2323

24-
/**
25-
* @doesNotPerformAssertions
26-
*/
27-
public function testCouldBeConstructedWithRequiredArguments()
28-
{
29-
new DbalProducer($this->createContextMock());
30-
}
31-
3224
public function testShouldThrowIfDestinationOfInvalidType()
3325
{
3426
$this->expectException(InvalidDestinationException::class);

pkg/dbal/Tests/DbalSubscriptionConsumerTest.php

-8
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,6 @@ public function testShouldImplementSubscriptionConsumerInterface()
2525
$this->assertTrue($rc->implementsInterface(SubscriptionConsumer::class));
2626
}
2727

28-
/**
29-
* @doesNotPerformAssertions
30-
*/
31-
public function testCouldBeConstructedWithDbalContextAsFirstArgument()
32-
{
33-
new DbalSubscriptionConsumer($this->createDbalContextMock());
34-
}
35-
3628
public function testShouldAddConsumerAndCallbackToSubscribersPropertyOnSubscribe()
3729
{
3830
$subscriptionConsumer = new DbalSubscriptionConsumer($this->createDbalContextMock());

pkg/dsn/Tests/DsnTest.php

-8
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,6 @@
88

99
class DsnTest extends TestCase
1010
{
11-
/**
12-
* @doesNotPerformAssertions
13-
*/
14-
public function testCouldBeConstructedWithDsnAsFirstArgument()
15-
{
16-
Dsn::parseFirst('foo://localhost:1234');
17-
}
18-
1911
public function testThrowsIfSchemePartIsMissing()
2012
{
2113
$this->expectException(\LogicException::class);

pkg/enqueue-bundle/Tests/Unit/Consumption/Extension/DoctrineClearIdentityMapExtensionTest.php

-8
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,6 @@
1616

1717
class DoctrineClearIdentityMapExtensionTest extends TestCase
1818
{
19-
/**
20-
* @doesNotPerformAssertions
21-
*/
22-
public function testCouldBeConstructedWithRequiredArguments()
23-
{
24-
new DoctrineClearIdentityMapExtension($this->createRegistryMock());
25-
}
26-
2719
public function testShouldClearIdentityMap()
2820
{
2921
$manager = $this->createManagerMock();

pkg/enqueue-bundle/Tests/Unit/Consumption/Extension/DoctrinePingConnectionExtensionTest.php

-8
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,6 @@
1717

1818
class DoctrinePingConnectionExtensionTest extends TestCase
1919
{
20-
/**
21-
* @doesNotPerformAssertions
22-
*/
23-
public function testCouldBeConstructedWithRequiredAttributes()
24-
{
25-
new DoctrinePingConnectionExtension($this->createRegistryMock());
26-
}
27-
2820
public function testShouldNotReconnectIfConnectionIsOK()
2921
{
3022
$connection = $this->createConnectionMock();

pkg/enqueue-bundle/Tests/Unit/Consumption/Extension/ResetServicesExtensionTest.php

-7
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,6 @@
1616

1717
class ResetServicesExtensionTest extends TestCase
1818
{
19-
/**
20-
* @doesNotPerformAssertions
21-
*/
22-
public function testCouldBeConstructedWithRequiredArguments()
23-
{
24-
new ResetServicesExtension($this->createResetterMock());
25-
}
2619

2720
public function testItShouldResetServices()
2821
{

pkg/enqueue-bundle/Tests/Unit/DependencyInjection/ConfigurationTest.php

-8
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,6 @@ public function testShouldBeFinal()
2525
$this->assertClassFinal(Configuration::class);
2626
}
2727

28-
/**
29-
* @doesNotPerformAssertions
30-
*/
31-
public function testCouldBeConstructedWithDebugAsArgument()
32-
{
33-
new Configuration(true);
34-
}
35-
3628
public function testShouldProcessSeveralTransports()
3729
{
3830
$configuration = new Configuration(true);

pkg/enqueue-bundle/Tests/Unit/DependencyInjection/EnqueueExtensionTest.php

-8
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,6 @@ public function testShouldBeFinal()
3030
$this->assertClassFinal(EnqueueExtension::class);
3131
}
3232

33-
/**
34-
* @doesNotPerformAssertions
35-
*/
36-
public function testCouldBeConstructedWithoutAnyArguments()
37-
{
38-
new EnqueueExtension();
39-
}
40-
4133
public function testShouldRegisterConnectionFactory()
4234
{
4335
$container = $this->getContainerBuilder(true);

pkg/enqueue-bundle/Tests/Unit/EnqueueBundleTest.php

-8
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,4 @@ public function testShouldExtendBundleClass()
1515
{
1616
$this->assertClassExtends(Bundle::class, EnqueueBundle::class);
1717
}
18-
19-
/**
20-
* @doesNotPerformAssertions
21-
*/
22-
public function testCouldBeConstructedWithoutAnyArguments()
23-
{
24-
new EnqueueBundle();
25-
}
2618
}

pkg/enqueue-bundle/Tests/Unit/Profiler/MessageQueueCollectorTest.php

-8
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,6 @@ public function testShouldExtendDataCollectorClass()
2323
$this->assertClassExtends(DataCollector::class, MessageQueueCollector::class);
2424
}
2525

26-
/**
27-
* @doesNotPerformAssertions
28-
*/
29-
public function testCouldBeConstructedWithEmptyConstructor()
30-
{
31-
new MessageQueueCollector();
32-
}
33-
3426
public function testShouldReturnExpectedName()
3527
{
3628
$collector = new MessageQueueCollector();

pkg/enqueue/Tests/ArrayProcessorRegistryTest.php

-8
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();

pkg/enqueue/Tests/Client/ChainExtensionTest.php

-8
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);

pkg/enqueue/Tests/Client/ConsumptionExtension/DelayRedeliveredMessageExtensionTest.php

-7
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
{

pkg/enqueue/Tests/Client/ConsumptionExtension/ExclusiveCommandExtensionTest.php

-8
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();

pkg/enqueue/Tests/Client/ConsumptionExtension/FlushSpoolProducerExtensionTest.php

-8
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();

0 commit comments

Comments
 (0)