9
9
use PhpSchool \PhpWorkshop \Result \Failure ;
10
10
use PhpSchool \PhpWorkshop \TestUtils \WorkshopExerciseTest ;
11
11
12
- class PhpPromotionTest extends WorkshopExerciseTest
12
+ class PhpGetsAPromotionTest extends WorkshopExerciseTest
13
13
{
14
14
public function getExerciseClass (): string
15
15
{
@@ -30,7 +30,7 @@ public function testWithNoCode(): void
30
30
$ this ->assertResultsHasFailure (Failure::class, 'No code was found ' );
31
31
}
32
32
33
- public function testWithNoPropertyPromotion ()
33
+ public function testWithNoPropertyPromotion (): void
34
34
{
35
35
$ this ->runExercise ('solution-no-property-promotion.php ' );
36
36
@@ -39,7 +39,7 @@ public function testWithNoPropertyPromotion()
39
39
$ this ->assertResultsHasFailure (Failure::class, 'Properties "visitor" & "key" were not promoted ' );
40
40
}
41
41
42
- public function testWithNotAllPropertiesPromoted ()
42
+ public function testWithNotAllPropertiesPromoted (): void
43
43
{
44
44
$ this ->runExercise ('solution-not-all-promoted.php ' );
45
45
@@ -48,7 +48,7 @@ public function testWithNotAllPropertiesPromoted()
48
48
$ this ->assertResultsHasFailure (Failure::class, 'Property "key" was not promoted ' );
49
49
}
50
50
51
- public function testFailureWhenPropertiesMissing ()
51
+ public function testFailureWhenPropertiesMissing (): void
52
52
{
53
53
$ this ->runExercise ('solution-properties-missing.php ' );
54
54
@@ -57,7 +57,7 @@ public function testFailureWhenPropertiesMissing()
57
57
$ this ->assertResultsHasFailure (Failure::class, 'Property "key" was missing ' );
58
58
}
59
59
60
- public function testFailureIfNoClassStatement ()
60
+ public function testFailureIfNoClassStatement (): void
61
61
{
62
62
$ this ->runExercise ('solution-no-class.php ' );
63
63
@@ -66,7 +66,7 @@ public function testFailureIfNoClassStatement()
66
66
$ this ->assertResultsHasFailure (Failure::class, 'No class was found ' );
67
67
}
68
68
69
- public function testFailureWhenPropertyVisibilityChanges ()
69
+ public function testFailureWhenPropertyVisibilityChanges (): void
70
70
{
71
71
$ this ->runExercise ('solution-visibility-mutated.php ' );
72
72
@@ -75,7 +75,7 @@ public function testFailureWhenPropertyVisibilityChanges()
75
75
$ this ->assertResultsHasFailure (Failure::class, 'Visibility changed for properties "basePath" & "key" ' );
76
76
}
77
77
78
- public function testBadPropertyPromotion ()
78
+ public function testBadPropertyPromotion (): void
79
79
{
80
80
$ this ->runExercise ('solution-incorrect-promotion.php ' );
81
81
@@ -84,7 +84,7 @@ public function testBadPropertyPromotion()
84
84
$ this ->assertResultsHasFailure (Failure::class, 'Property "config" should not be promoted ' );
85
85
}
86
86
87
- public function testFaliureIfPropertiesChangeType ()
87
+ public function testFaliureIfPropertiesChangeType (): void
88
88
{
89
89
$ this ->runExercise ('solution-type-mutated.php ' );
90
90
@@ -93,7 +93,7 @@ public function testFaliureIfPropertiesChangeType()
93
93
$ this ->assertResultsHasFailure (Failure::class, 'Property "key" should not have changed type ' );
94
94
}
95
95
96
- public function testFailureIfPropertyDataIncorrect ()
96
+ public function testFailureIfPropertyDataIncorrect (): void
97
97
{
98
98
$ this ->runExercise ('solution-data-not-set.php ' );
99
99
@@ -102,7 +102,7 @@ public function testFailureIfPropertyDataIncorrect()
102
102
$ this ->assertResultsHasFailure (Failure::class, 'Data not correctly set on property "basePath" ' );
103
103
}
104
104
105
- public function testSuccessWithCorrectSolution ()
105
+ public function testSuccessWithCorrectSolution (): void
106
106
{
107
107
$ this ->runExercise ('solution.php ' );
108
108
0 commit comments