File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
tests/Feature/ValueObjects Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ final class Then
1515 */
1616 public function __construct (public string $ action , public string |UnitEnum $ then )
1717 {
18- if ($ action === FractionName::format ($ then )) {
18+ if (FractionName:: format ( $ action) === FractionName::format ($ then )) {
1919 throw new PreventLoop ();
2020 }
2121 }
Original file line number Diff line number Diff line change 66use Fraction \ValueObjects \Then ;
77
88test ('can instantiate ' , function () {
9- $ then = new Then ('foo ' , 'foo ' );
9+ $ then = new Then ('foo ' , 'bar ' );
1010
11- expect ($ then ->then )->toBe ('foo ' );
11+ expect ($ then ->then )->toBe ('bar ' );
1212});
1313
1414test ('cannot instantiate due same name ' , function () {
15- $ then = new Then ('__fraction.foo ' , 'foo ' );
15+ $ then = new Then ('action ' , 'action ' );
1616
1717 expect ($ then ->then )->toBe ('foo ' );
1818})->throws (PreventLoop::class, 'The hook "then" cannot be used to invoke itself. ' );
You can’t perform that action at this time.
0 commit comments