Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing risky tests #1371

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions pkg/amqp-bunny/Tests/AmqpConsumerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ public function testShouldImplementConsumerInterface()
$this->assertClassImplements(Consumer::class, AmqpConsumer::class);
}

/**
* @doesNotPerformAssertions
*/
public function testCouldBeConstructedWithContextAndQueueAsArguments()
{
new AmqpConsumer($this->createContextMock(), new AmqpQueue('aName'));
Expand Down
4 changes: 4 additions & 0 deletions pkg/amqp-bunny/Tests/AmqpProducerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ class AmqpProducerTest extends TestCase
{
use ClassExtensionTrait;

/**
* @doesNotPerformAssertions
*/

public function testCouldBeConstructedWithRequiredArguments()
{
new AmqpProducer($this->createBunnyChannelMock(), $this->createContextMock());
Expand Down
3 changes: 3 additions & 0 deletions pkg/amqp-bunny/Tests/AmqpSubscriptionConsumerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ public function testShouldImplementQueueInteropSubscriptionConsumerInterface()
$this->assertTrue($rc->implementsInterface(SubscriptionConsumer::class));
}

/**
* @doesNotPerformAssertions
*/
public function testCouldBeConstructedWithAmqpContextAsFirstArgument()
{
new AmqpSubscriptionConsumer($this->createAmqpContextMock());
Expand Down
3 changes: 3 additions & 0 deletions pkg/amqp-ext/Tests/AmqpConsumerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ public function testShouldImplementConsumerInterface()
$this->assertClassImplements(Consumer::class, AmqpConsumer::class);
}

/**
* @doesNotPerformAssertions
*/
public function testCouldBeConstructedWithContextAndQueueAsArguments()
{
new AmqpConsumer($this->createContext(), new AmqpQueue('aName'));
Expand Down
6 changes: 6 additions & 0 deletions pkg/amqp-ext/Tests/AmqpContextTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,17 @@ public function testShouldImplementQueueInteropContextInterface()
$this->assertClassImplements(Context::class, AmqpContext::class);
}

/**
* @doesNotPerformAssertions
*/
public function testCouldBeConstructedWithExtChannelAsFirstArgument()
{
new AmqpContext($this->createExtChannelMock());
}

/**
* @doesNotPerformAssertions
*/
public function testCouldBeConstructedWithExtChannelCallbackFactoryAsFirstArgument()
{
new AmqpContext(function () {
Expand Down
3 changes: 3 additions & 0 deletions pkg/amqp-ext/Tests/AmqpSubscriptionConsumerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ public function testShouldImplementQueueInteropSubscriptionConsumerInterface()
$this->assertTrue($rc->implementsInterface(SubscriptionConsumer::class));
}

/**
* @doesNotPerformAssertions
*/
public function testCouldBeConstructedWithAmqpContextAsFirstArgument()
{
new AmqpSubscriptionConsumer($this->createAmqpContextMock());
Expand Down
3 changes: 3 additions & 0 deletions pkg/async-event-dispatcher/Tests/AsyncProcessorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ public function testShouldImplementProcessorInterface()
$this->assertClassImplements(Processor::class, AsyncProcessor::class);
}

/**
* @doesNotPerformAssertions
*/
public function testCouldBeConstructedWithRegistryAndProxyEventDispatcher()
{
new AsyncProcessor($this->createRegistryMock(), $this->createProxyEventDispatcherMock());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ public function testShouldImplementEventTransformerInterface()
$this->assertClassImplements(EventTransformer::class, PhpSerializerEventTransformer::class);
}

/**
* @doesNotPerformAssertions
*/
public function testCouldBeConstructedWithoutAnyArguments()
{
new PhpSerializerEventTransformer($this->createContextStub());
Expand Down
3 changes: 3 additions & 0 deletions pkg/async-event-dispatcher/Tests/SimpleRegistryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ public function testShouldImplementRegistryInterface()
$this->assertClassImplements(Registry::class, SimpleRegistry::class);
}

/**
* @doesNotPerformAssertions
*/
public function testCouldBeConstructedWithEventsMapAndTransformersMapAsArguments()
{
new SimpleRegistry([], []);
Expand Down
3 changes: 3 additions & 0 deletions pkg/dbal/Tests/DbalConsumerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ public function testShouldImplementConsumerInterface()
$this->assertClassImplements(Consumer::class, DbalConsumer::class);
}

/**
* @doesNotPerformAssertions
*/
public function testCouldBeConstructedWithRequiredArguments()
{
new DbalConsumer($this->createContextMock(), new DbalDestination('queue'));
Expand Down
3 changes: 3 additions & 0 deletions pkg/dbal/Tests/DbalContextTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ public function testShouldImplementContextInterface()
$this->assertClassImplements(Context::class, DbalContext::class);
}

/**
* @doesNotPerformAssertions
*/
public function testCouldBeConstructedWithRequiredArguments()
{
new DbalContext($this->createConnectionMock());
Expand Down
3 changes: 3 additions & 0 deletions pkg/dbal/Tests/DbalProducerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ public function testShouldImplementProducerInterface()
$this->assertClassImplements(Producer::class, DbalProducer::class);
}

/**
* @doesNotPerformAssertions
*/
public function testCouldBeConstructedWithRequiredArguments()
{
new DbalProducer($this->createContextMock());
Expand Down
6 changes: 6 additions & 0 deletions pkg/dbal/Tests/DbalSubscriptionConsumerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ public function testShouldImplementSubscriptionConsumerInterface()
$this->assertTrue($rc->implementsInterface(SubscriptionConsumer::class));
}

/**
* @doesNotPerformAssertions
*/
public function testCouldBeConstructedWithDbalContextAsFirstArgument()
{
new DbalSubscriptionConsumer($this->createDbalContextMock());
Expand Down Expand Up @@ -66,6 +69,9 @@ public function testThrowsIfTrySubscribeAnotherConsumerToAlreadySubscribedQueue(
$subscriptionConsumer->subscribe($barConsumer, $barCallback);
}

/**
* @doesNotPerformAssertions
*/
public function testShouldAllowSubscribeSameConsumerAndCallbackSecondTime()
{
$subscriptionConsumer = new DbalSubscriptionConsumer($this->createDbalContextMock());
Expand Down
3 changes: 3 additions & 0 deletions pkg/dsn/Tests/DsnTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@

class DsnTest extends TestCase
{
/**
* @doesNotPerformAssertions
*/
public function testCouldBeConstructedWithDsnAsFirstArgument()
{
Dsn::parseFirst('foo://localhost:1234');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@

class DoctrineClearIdentityMapExtensionTest extends TestCase
{
/**
* @doesNotPerformAssertions
*/
public function testCouldBeConstructedWithRequiredArguments()
{
new DoctrineClearIdentityMapExtension($this->createRegistryMock());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@

class DoctrinePingConnectionExtensionTest extends TestCase
{
/**
* @doesNotPerformAssertions
*/
public function testCouldBeConstructedWithRequiredAttributes()
{
new DoctrinePingConnectionExtension($this->createRegistryMock());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@

class ResetServicesExtensionTest extends TestCase
{
/**
* @doesNotPerformAssertions
*/
public function testCouldBeConstructedWithRequiredArguments()
{
new ResetServicesExtension($this->createResetterMock());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ public function testShouldBeFinal()
$this->assertClassFinal(Configuration::class);
}

/**
* @doesNotPerformAssertions
*/
public function testCouldBeConstructedWithDebugAsArgument()
{
new Configuration(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ public function testShouldBeFinal()
$this->assertClassFinal(EnqueueExtension::class);
}

/**
* @doesNotPerformAssertions
*/
public function testCouldBeConstructedWithoutAnyArguments()
{
new EnqueueExtension();
Expand Down
3 changes: 3 additions & 0 deletions pkg/enqueue-bundle/Tests/Unit/EnqueueBundleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ public function testShouldExtendBundleClass()
$this->assertClassExtends(Bundle::class, EnqueueBundle::class);
}

/**
* @doesNotPerformAssertions
*/
public function testCouldBeConstructedWithoutAnyArguments()
{
new EnqueueBundle();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ public function testShouldExtendDataCollectorClass()
$this->assertClassExtends(DataCollector::class, MessageQueueCollector::class);
}

/**
* @doesNotPerformAssertions
*/
public function testCouldBeConstructedWithEmptyConstructor()
{
new MessageQueueCollector();
Expand Down
3 changes: 3 additions & 0 deletions pkg/enqueue/Tests/ArrayProcessorRegistryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ public function testShouldImplementProcessorRegistryInterface()
$this->assertClassImplements(ProcessorRegistryInterface::class, ArrayProcessorRegistry::class);
}

/**
* @doesNotPerformAssertions
*/
public function testCouldBeConstructedWithoutAnyArgument()
{
new ArrayProcessorRegistry();
Expand Down
3 changes: 3 additions & 0 deletions pkg/enqueue/Tests/Client/ChainExtensionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ public function testShouldBeFinal()
$this->assertClassFinal(ChainExtension::class);
}

/**
* @doesNotPerformAssertions
*/
public function testCouldBeConstructedWithExtensionsArray()
{
new ChainExtension([$this->createExtension(), $this->createExtension()]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@

class DelayRedeliveredMessageExtensionTest extends TestCase
{
/**
* @doesNotPerformAssertions
*/
public function testCouldBeConstructedWithRequiredArguments()
{
new DelayRedeliveredMessageExtension($this->createDriverMock(), 12345);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ public function testShouldBeFinal()
$this->assertClassFinal(ExclusiveCommandExtension::class);
}

/**
* @doesNotPerformAssertions
*/
public function testCouldBeConstructedWithDriverAsFirstArgument()
{
new ExclusiveCommandExtension($this->createDriverStub());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ public function testShouldImplementEndExtensionInterface()
$this->assertClassImplements(EndExtensionInterface::class, FlushSpoolProducerExtension::class);
}

/**
* @doesNotPerformAssertions
*/
public function testCouldBeConstructedWithSpoolProducerAsFirstArgument()
{
new FlushSpoolProducerExtension($this->createSpoolProducerMock());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ public function testShouldSubClassOfLogExtension()
$this->assertClassExtends(\Enqueue\Consumption\Extension\LogExtension::class, LogExtension::class);
}

/**
* @doesNotPerformAssertions
*/
public function testCouldBeConstructedWithoutAnyArguments()
{
new LogExtension();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ public function testShouldImplementMessageReceivedExtensionInterface()
$this->assertClassImplements(MessageReceivedExtensionInterface::class, SetRouterPropertiesExtension::class);
}

/**
* @doesNotPerformAssertions
*/
public function testCouldBeConstructedWithRequiredArguments()
{
new SetRouterPropertiesExtension($this->createDriverMock());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ public function testShouldImplementStartExtensionInterface()
$this->assertClassImplements(StartExtensionInterface::class, SetupBrokerExtension::class);
}

/**
* @doesNotPerformAssertions
*/
public function testCouldBeConstructedWithRequiredArguments()
{
new SetupBrokerExtension($this->createDriverMock());
Expand Down
3 changes: 3 additions & 0 deletions pkg/enqueue/Tests/Client/DelegateProcessorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@

class DelegateProcessorTest extends TestCase
{
/**
* @doesNotPerformAssertions
*/
public function testCouldBeConstructedWithRequiredArguments()
{
new DelegateProcessor($this->createProcessorRegistryMock());
Expand Down
3 changes: 3 additions & 0 deletions pkg/enqueue/Tests/Client/DriverFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ public function testShouldBeFinal()
$this->assertTrue($rc->isFinal());
}

/**
* @doesNotPerformAssertions
*/
public function testCouldBeConstructedWithoutAnyArguments()
{
new DriverFactory();
Expand Down
3 changes: 3 additions & 0 deletions pkg/enqueue/Tests/Client/DriverPreSendTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ public function testShouldBeFinal()
self::assertClassFinal(DriverPreSend::class);
}

/**
* @doesNotPerformAssertions
*/
public function testCouldBeConstructedWithExpectedArguments()
{
new DriverPreSend(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ public function testShouldImplementExtensionInterface()
$this->assertTrue($rc->implementsInterface(PreSendCommandExtensionInterface::class));
}

/**
* @doesNotPerformAssertions
*/
public function testCouldConstructedWithoutAnyArguments()
{
new PrepareBodyExtension();
Expand Down
3 changes: 3 additions & 0 deletions pkg/enqueue/Tests/Client/PostSendTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ public function testShouldBeFinal()
self::assertClassFinal(PostSend::class);
}

/**
* @doesNotPerformAssertions
*/
public function testCouldBeConstructedWithExpectedArguments()
{
new PostSend(
Expand Down
3 changes: 3 additions & 0 deletions pkg/enqueue/Tests/Client/PreSendTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ public function testShouldBeFinal()
self::assertClassFinal(PreSend::class);
}

/**
* @doesNotPerformAssertions
*/
public function testCouldBeConstructedWithExpectedArguments()
{
new PreSend(
Expand Down
6 changes: 6 additions & 0 deletions pkg/enqueue/Tests/Client/ProducerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,17 @@ public function testShouldBeFinal()
self::assertClassFinal(Producer::class);
}

/**
* @doesNotPerformAssertions
*/
public function testCouldBeConstructedWithRequiredArguments()
{
new Producer($this->createDriverMock(), $this->createRpcFactoryMock());
}

/**
* @doesNotPerformAssertions
*/
public function testCouldBeConstructedWithOptionalArguments()
{
new Producer(
Expand Down
3 changes: 3 additions & 0 deletions pkg/enqueue/Tests/Client/SpoolProducerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ public function testShouldImplementProducerInterface()
self::assertClassImplements(ProducerInterface::class, SpoolProducer::class);
}

/**
* @doesNotPerformAssertions
*/
public function testCouldBeConstructedWithRealProducer()
{
new SpoolProducer($this->createProducerMock());
Expand Down
Loading
Loading