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
93
93
$ this ->assertResultsHasFailure (Failure::class, 'Property "key" should not have changed type ' );
94
94
}
95
95
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
+
96
105
public function testFailureIfPropertyDataIncorrect (): void
97
106
{
98
107
$ this ->runExercise ('solution-data-not-set.php ' );
Original file line number Diff line number Diff line change 1
1
<?php
2
2
3
- class RowVisitorTypeMutated
3
+ class RowVisitorTypeRemoved
4
4
{
5
- protected string $ basePath ;
5
+ protected $ basePath ;
6
6
7
7
public function __construct (
8
8
private \Closure $ visitor ,
9
- private \ Stringable $ key ,
9
+ private $ key ,
10
10
array $ config = []
11
11
) {
12
12
$ this ->basePath = $ config ['basePath ' ] ?? '' ;
You can’t perform that action at this time.
0 commit comments