Skip to content

Commit

Permalink
Replace $this->expectNotToPerformAssertions() with $this->addToAssert…
Browse files Browse the repository at this point in the history
…ionCount(1)
  • Loading branch information
Zombaya committed Aug 11, 2022
1 parent 7237709 commit 69a65c7
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion tests/Api/ValidatorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,7 @@ public function testValidatesInput($shape, $input, $result)

try {
$validator->validate('Foo', $shape, $input);
$this->expectNotToPerformAssertions();
$this->addToAssertionCount(1); // To be replaced with $this->expectNotToPerformAssertions();
if ($result !== true) {
$this->fail('Should have failed with ' . $result);
}
Expand Down
2 changes: 1 addition & 1 deletion tests/EndpointParameterMiddlewareTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public function testCorrectlyOutputsHost(
$expectedHost
) {
if ($cmdName === 'NoEndpointOp') {
$this->expectNotToPerformAssertions();
$this->addToAssertionCount(1); // To be replaced with $this->expectNotToPerformAssertions();
}
$client = $this->generateTestClient($service, $clientArgs);
$command = $client->getCommand($cmdName, $params);
Expand Down
4 changes: 2 additions & 2 deletions tests/S3/Crypto/S3EncryptionClientTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ public function testPutObjectValidatesCipher(
if ($exception) {
$this->setupProvidedExpectedException($exception);
} else {
$this->expectNotToPerformAssertions();
$this->addToAssertionCount(1); // To be replaced with $this->expectNotToPerformAssertions();
}

$s3 = $this->getS3Client();
Expand Down Expand Up @@ -302,7 +302,7 @@ public function testPutObjectValidatesKeySize(
if ($exception) {
$this->setupProvidedExpectedException($exception);
} else {
$this->expectNotToPerformAssertions();
$this->addToAssertionCount(1); // To be replaced with $this->expectNotToPerformAssertions();
}

$cipherOptions = [
Expand Down
4 changes: 2 additions & 2 deletions tests/S3/Crypto/S3EncryptionClientV2Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ public function testPutObjectValidatesCipher(
if ($exception) {
$this->setupProvidedExpectedException($exception);
} else {
$this->expectNotToPerformAssertions();
$this->addToAssertionCount(1); // To be replaced with $this->expectNotToPerformAssertions();
}

$s3 = $this->getS3Client();
Expand Down Expand Up @@ -314,7 +314,7 @@ public function testPutObjectValidatesKeySize(
if ($exception) {
$this->setupProvidedExpectedException($exception);
} else {
$this->expectNotToPerformAssertions();
$this->addToAssertionCount(1); // To be replaced with $this->expectNotToPerformAssertions();
}

$cipherOptions = [
Expand Down
4 changes: 2 additions & 2 deletions tests/S3/S3UriParserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,12 @@ public function testParsesUrls($uri, $result, $isError = false)
ksort($actual);
$this->assertSame($result, $actual);
} catch (\InvalidArgumentException $e) {
$this->expectNotToPerformAssertions();
$this->addToAssertionCount(1); // To be replaced with $this->expectNotToPerformAssertions();
if (!$isError) {
throw $e;
}
} catch (InvalidArnException $e) {
$this->expectNotToPerformAssertions();
$this->addToAssertionCount(1); // To be replaced with $this->expectNotToPerformAssertions();
if (!$isError) {
throw $e;
}
Expand Down
2 changes: 1 addition & 1 deletion tests/S3/StreamWrapperV2ExistenceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -875,7 +875,7 @@ public function testProvidesDirectoriesForS3()

public function testCanSetDelimiterStreamContext()
{
$this->expectNotToPerformAssertions();
$this->addToAssertionCount(1); // To be replaced with $this->expectNotToPerformAssertions();
$this->addMockResults($this->client, [
[
'IsTruncated' => false,
Expand Down

0 comments on commit 69a65c7

Please sign in to comment.