Skip to content

Commit 71400f0

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 3784404 commit 71400f0

File tree

3 files changed

+18
-0
lines changed

3 files changed

+18
-0
lines changed

Tests/FsConsumerTest.php

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

23+
/**
24+
* @doesNotPerformAssertions
25+
*/
2326
public function testCouldBeConstructedWithContextAndDestinationAndPreFetchCountAsArguments()
2427
{
2528
new FsConsumer($this->createContextMock(), new FsDestination(TempFile::generate()), 1);
@@ -50,13 +53,19 @@ public function testShouldAllowGetPreviouslySetPreFetchCount()
5053
$this->assertSame(456, $consumer->getPreFetchCount());
5154
}
5255

56+
/**
57+
* @doesNotPerformAssertions
58+
*/
5359
public function testShouldDoNothingOnAcknowledge()
5460
{
5561
$consumer = new FsConsumer($this->createContextMock(), new FsDestination(TempFile::generate()), 123);
5662

5763
$consumer->acknowledge(new FsMessage());
5864
}
5965

66+
/**
67+
* @doesNotPerformAssertions
68+
*/
6069
public function testShouldDoNothingOnReject()
6170
{
6271
$consumer = new FsConsumer($this->createContextMock(), new FsDestination(TempFile::generate()), 123);

Tests/FsContextTest.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ public function testShouldImplementContextInterface()
2424
$this->assertClassImplements(Context::class, FsContext::class);
2525
}
2626

27+
/**
28+
* @doesNotPerformAssertions
29+
*/
2730
public function testCouldBeConstructedWithExpectedArguments()
2831
{
2932
new FsContext(sys_get_temp_dir(), 1, 0666, 100);
@@ -122,6 +125,9 @@ public function testShouldThrowIfNotFsDestinationGivenOnCreateConsumer()
122125
$this->assertInstanceOf(FsConsumer::class, $consumer);
123126
}
124127

128+
/**
129+
* @doesNotPerformAssertions
130+
*/
125131
public function testShouldCreateConsumer()
126132
{
127133
$tmpFile = new TempFile(sys_get_temp_dir().'/foo');

Tests/FsProducerTest.php

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

26+
/**
27+
* @doesNotPerformAssertions
28+
*/
2629
public function testCouldBeConstructedWithContextAsFirstArgument()
2730
{
2831
new FsProducer($this->createContextMock());

0 commit comments

Comments
 (0)