File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,14 @@ public function satisfies(Specification $specification): bool
14
14
return $ specification ->isSatisfiedBy ($ this );
15
15
}
16
16
17
+ /**
18
+ * @param Specification<self> $specification
19
+ */
20
+ public function dissatisfies (Specification $ specification ): bool
21
+ {
22
+ return (new NotSpecification ($ specification ))->isSatisfiedBy ($ this );
23
+ }
24
+
17
25
/**
18
26
* @deprecated use `satisfies()` instead
19
27
*
Original file line number Diff line number Diff line change @@ -23,5 +23,8 @@ public function test_it_should_pass_the_candidate_to_the_specification(): void
23
23
// Act + Assert
24
24
$ this ->assertTrue ($ candidate ->satisfies (new PositiveSpecification ()));
25
25
$ this ->assertFalse ($ candidate ->satisfies (new NegativeSpecification ()));
26
+
27
+ $ this ->assertFalse ($ candidate ->dissatisfies (new PositiveSpecification ()));
28
+ $ this ->assertTrue ($ candidate ->dissatisfies (new NegativeSpecification ()));
26
29
}
27
30
}
You can’t perform that action at this time.
0 commit comments