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

Remove assertion count manipulation #270

Merged
merged 1 commit into from
Oct 14, 2018
Merged
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
2 changes: 1 addition & 1 deletion test/unit/Validation/Constraint/IdentifiedByTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ public function assertShouldRaiseExceptionWhenIdDoesNotMatch(): void

/**
* @test
* @doesNotPerformAssertions
*
* @covers \Lcobucci\JWT\Validation\Constraint\IdentifiedBy::__construct
* @covers \Lcobucci\JWT\Validation\Constraint\IdentifiedBy::assert
Expand All @@ -60,6 +61,5 @@ public function assertShouldNotRaiseExceptionWhenIdMatches(): void
$constraint = new IdentifiedBy('123456');

$constraint->assert($token);
$this->addToAssertionCount(1);
}
}
2 changes: 1 addition & 1 deletion test/unit/Validation/Constraint/IssuedByTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ public function assertShouldRaiseExceptionWhenIssuerTypeValueDoesNotMatch(): voi

/**
* @test
* @doesNotPerformAssertions
*
* @covers \Lcobucci\JWT\Validation\Constraint\IssuedBy::__construct
* @covers \Lcobucci\JWT\Validation\Constraint\IssuedBy::assert
Expand All @@ -77,6 +78,5 @@ public function assertShouldNotRaiseExceptionWhenIssuerMatches(): void
$constraint = new IssuedBy('test.com', 'test.net');

$constraint->assert($token);
$this->addToAssertionCount(1);
}
}
2 changes: 1 addition & 1 deletion test/unit/Validation/Constraint/PermittedForTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ public function assertShouldRaiseExceptionWhenAudienceTypeDoesNotMatch(): void

/**
* @test
* @doesNotPerformAssertions
*
* @covers \Lcobucci\JWT\Validation\Constraint\PermittedFor::__construct
* @covers \Lcobucci\JWT\Validation\Constraint\PermittedFor::assert
Expand All @@ -77,6 +78,5 @@ public function assertShouldNotRaiseExceptionWhenAudienceMatches(): void
$constraint = new PermittedFor('test.com');

$constraint->assert($token);
$this->addToAssertionCount(1);
}
}
2 changes: 1 addition & 1 deletion test/unit/Validation/Constraint/RelatedToTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ public function assertShouldRaiseExceptionWhenSubjectDoesNotMatch(): void

/**
* @test
* @doesNotPerformAssertions
*
* @covers \Lcobucci\JWT\Validation\Constraint\RelatedTo::__construct
* @covers \Lcobucci\JWT\Validation\Constraint\RelatedTo::assert
Expand All @@ -59,6 +60,5 @@ public function assertShouldNotRaiseExceptionWhenSubjectMatches(): void
$constraint = new RelatedTo('user-auth');

$constraint->assert($token);
$this->addToAssertionCount(1);
}
}
1 change: 0 additions & 1 deletion test/unit/Validation/Constraint/SignedWithTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,5 @@ public function assertShouldRaiseExceptionWhenSignatureIsValid(): void
$constraint = new SignedWith($this->signer, $this->key);

$constraint->assert($token);
$this->addToAssertionCount(1);
}
}
5 changes: 2 additions & 3 deletions test/unit/Validation/Constraint/ValidAtTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ public function assertShouldRaiseExceptionWhenTokenWasIssuedInTheFuture(): void

/**
* @test
* @doesNotPerformAssertions
*
* @covers \Lcobucci\JWT\Validation\Constraint\ValidAt::__construct
* @covers \Lcobucci\JWT\Validation\Constraint\ValidAt::assert
Expand All @@ -136,7 +137,6 @@ public function assertShouldNotRaiseExceptionWhenTokenIsUsedInTheRightMoment():
);

$constraint->assert($token);
$this->addToAssertionCount(1);

$token = $this->buildToken(
[
Expand All @@ -147,11 +147,11 @@ public function assertShouldNotRaiseExceptionWhenTokenIsUsedInTheRightMoment():
);

$constraint->assert($token);
$this->addToAssertionCount(1);
}

/**
* @test
* @doesNotPerformAssertions
*
* @covers \Lcobucci\JWT\Validation\Constraint\ValidAt::__construct
* @covers \Lcobucci\JWT\Validation\Constraint\ValidAt::assert
Expand All @@ -169,6 +169,5 @@ public function assertShouldNotRaiseExceptionWhenTokenDoesNotHaveTimeClaims(): v
$constraint = new ValidAt($this->clock);

$constraint->assert($token);
$this->addToAssertionCount(1);
}
}
1 change: 0 additions & 1 deletion test/unit/Validation/ValidatorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ public function assertShouldNotRaiseExceptionWhenNoConstraintFails(): void
$validator = new Validator();

$validator->assert($this->token, $constraint);
$this->addToAssertionCount(1);
}

/**
Expand Down