File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed
solutions/php-gets-a-promotion Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -93,6 +93,15 @@ public function testFailureIfPropertiesChangeType(): void
9393 $ this ->assertResultsHasFailure (Failure::class, 'Property "key" should not have changed type ' );
9494 }
9595
96+ public function testFailureIfPropertiesTypeRemoved (): void
97+ {
98+ $ this ->runExercise ('solution-type-removed.php ' );
99+
100+ $ this ->assertVerifyWasNotSuccessful ();
101+
102+ $ this ->assertResultsHasFailure (Failure::class, 'Properties "key" & "basePath" should not have changed type ' );
103+ }
104+
96105 public function testFailureIfPropertyDataIncorrect (): void
97106 {
98107 $ this ->runExercise ('solution-data-not-set.php ' );
Original file line number Diff line number Diff line change 11<?php
22
3- class RowVisitorTypeMutated
3+ class RowVisitorTypeRemoved
44{
5- protected string $ basePath ;
5+ protected $ basePath ;
66
77 public function __construct (
88 private \Closure $ visitor ,
9- private \ Stringable $ key ,
9+ private $ key ,
1010 array $ config = []
1111 ) {
1212 $ this ->basePath = $ config ['basePath ' ] ?? '' ;
You can’t perform that action at this time.
0 commit comments