File tree Expand file tree Collapse file tree 4 files changed +8
-7
lines changed Expand file tree Collapse file tree 4 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ All notable changes to `laravel-specification-pattern` will be documented in thi
66
77### Changed
88
9+ - Renamed ` SpecificationException ` to ` DissatisfiedSpecification ` .
910- Marked the following classes as final:
1011 - ` AndSpecification ` .
1112 - ` NotSpecification ` .
Original file line number Diff line number Diff line change 66
77use Exception ;
88
9- class SpecificationException extends Exception
9+ final class DissatisfiedSpecification extends Exception
1010{
1111}
Original file line number Diff line number Diff line change @@ -39,14 +39,14 @@ public function message(): string
3939 /**
4040 * @param TCandidate $candidate
4141 *
42- * @throws SpecificationException
42+ * @throws DissatisfiedSpecification
4343 */
4444 public function isSatisfiedBy (mixed $ candidate ): bool
4545 {
4646 if ($ this ->origin ->isSatisfiedBy ($ candidate )) {
4747 return true ;
4848 }
4949
50- throw new SpecificationException ($ this ->message );
50+ throw new DissatisfiedSpecification ($ this ->message );
5151 }
5252}
Original file line number Diff line number Diff line change 44
55namespace Maartenpaauw \Specifications \Tests ;
66
7- use Maartenpaauw \Specifications \SpecificationException ;
7+ use Maartenpaauw \Specifications \DissatisfiedSpecification ;
88use Maartenpaauw \Specifications \Tests \Dummy \LengthSpecification ;
99use Maartenpaauw \Specifications \VerboseSpecification ;
1010
11- class VerboseExceptionTest extends TestCase
11+ class VerboseSpecificationTest extends TestCase
1212{
1313 /** @var VerboseSpecification<string> */
1414 private VerboseSpecification $ specification ;
@@ -26,7 +26,7 @@ protected function setUp(): void
2626 public function it_should_throw_an_exception_with_an_empty_message_when_the_specification_is_not_satisfied (): void
2727 {
2828 // Assert
29- $ this ->expectException (SpecificationException ::class);
29+ $ this ->expectException (DissatisfiedSpecification ::class);
3030 $ this ->expectExceptionMessage ('' );
3131
3232 // Act
@@ -37,7 +37,7 @@ public function it_should_throw_an_exception_with_an_empty_message_when_the_spec
3737 public function it_should_be_possible_to_customize_the_exception_message (): void
3838 {
3939 // Assert
40- $ this ->expectException (SpecificationException ::class);
40+ $ this ->expectException (DissatisfiedSpecification ::class);
4141 $ this ->expectExceptionMessage ('The given string is longer than 12 characters! ' );
4242
4343 // Act
You can’t perform that action at this time.
0 commit comments