File tree 7 files changed +61
-37
lines changed
Version06/TestMethod/WithMaximumDurationAnnotation
Version07/TestMethod/WithMaximumDurationAnnotation
Version08/TestMethod/WithMaximumDurationAnnotation
Version09/TestMethod/WithMaximumDurationAnnotation
Version10/TestMethod/WithMaximumDurationAnnotation
Version11/TestMethod/WithMaximumDurationAnnotation
7 files changed +61
-37
lines changed Original file line number Diff line number Diff line change @@ -358,7 +358,7 @@ private function resolveMaximumDuration(string $test): MaximumDuration
358
358
':: ' ,
359
359
$ test
360
360
);
361
- $ testMethodName = explode (' with data set ' , $ testMethodName )[0 ];
361
+ $ testMethodName = \ explode (' with data set ' , $ testMethodName )[0 ];
362
362
363
363
$ annotations = [
364
364
'maximumDuration ' ,
Original file line number Diff line number Diff line change @@ -63,12 +63,9 @@ public function testSleeperSleepsShorterThanMaximumDurationFromAnnotationWhenTes
63
63
self ::assertSame ($ milliseconds , $ sleeper ->milliseconds ());
64
64
}
65
65
66
- public function mockDataProvider () {
67
- return array (array ('mockArgument ' ));
68
- }
69
-
70
66
/**
71
67
* @maximumDuration 200
68
+ *
72
69
* @dataProvider mockDataProvider
73
70
*/
74
71
public function testSleeperSleepsShorterThanMaximumDurationFromAnnotationWithNumericDataProvider ()
@@ -82,12 +79,14 @@ public function testSleeperSleepsShorterThanMaximumDurationFromAnnotationWithNum
82
79
self ::assertSame ($ milliseconds , $ sleeper ->milliseconds ());
83
80
}
84
81
85
- public function mockDataProviderWithAssociativeArray () {
86
- return array ('mockTest ' => ['mockData ' ]);
82
+ public static function mockDataProvider ()
83
+ {
84
+ return [['mockArgument ' ]];
87
85
}
88
86
89
87
/**
90
88
* @maximumDuration 200
89
+ *
91
90
* @dataProvider mockDataProviderWithAssociativeArray
92
91
*/
93
92
public function testSleeperSleepsShorterThanMaximumDurationFromAnnotationWithNamedDataProvider ()
@@ -101,6 +100,11 @@ public function testSleeperSleepsShorterThanMaximumDurationFromAnnotationWithNam
101
100
self ::assertSame ($ milliseconds , $ sleeper ->milliseconds ());
102
101
}
103
102
103
+ public static function mockDataProviderWithAssociativeArray ()
104
+ {
105
+ return ['mockTest ' => ['mockData ' ]];
106
+ }
107
+
104
108
/**
105
109
* @maximumDuration 200
106
110
*/
Original file line number Diff line number Diff line change @@ -63,12 +63,9 @@ public function testSleeperSleepsShorterThanMaximumDurationFromAnnotationWhenTes
63
63
self ::assertSame ($ milliseconds , $ sleeper ->milliseconds ());
64
64
}
65
65
66
- public function mockDataProvider () {
67
- return array (array ('mockArgument ' ));
68
- }
69
-
70
66
/**
71
67
* @maximumDuration 200
68
+ *
72
69
* @dataProvider mockDataProvider
73
70
*/
74
71
public function testSleeperSleepsShorterThanMaximumDurationFromAnnotationWithNumericDataProvider (): void
@@ -82,12 +79,14 @@ public function testSleeperSleepsShorterThanMaximumDurationFromAnnotationWithNum
82
79
self ::assertSame ($ milliseconds , $ sleeper ->milliseconds ());
83
80
}
84
81
85
- public function mockDataProviderWithAssociativeArray () {
86
- return array ('mockTest ' => ['mockData ' ]);
82
+ public static function mockDataProvider ()
83
+ {
84
+ return [['mockArgument ' ]];
87
85
}
88
86
89
87
/**
90
88
* @maximumDuration 200
89
+ *
91
90
* @dataProvider mockDataProviderWithAssociativeArray
92
91
*/
93
92
public function testSleeperSleepsShorterThanMaximumDurationFromAnnotationWithNamedDataProvider (): void
@@ -101,6 +100,11 @@ public function testSleeperSleepsShorterThanMaximumDurationFromAnnotationWithNam
101
100
self ::assertSame ($ milliseconds , $ sleeper ->milliseconds ());
102
101
}
103
102
103
+ public static function mockDataProviderWithAssociativeArray ()
104
+ {
105
+ return ['mockTest ' => ['mockData ' ]];
106
+ }
107
+
104
108
/**
105
109
* @maximumDuration 200
106
110
*/
Original file line number Diff line number Diff line change @@ -63,12 +63,9 @@ public function testSleeperSleepsShorterThanMaximumDurationFromAnnotationWhenTes
63
63
self ::assertSame ($ milliseconds , $ sleeper ->milliseconds ());
64
64
}
65
65
66
- public function mockDataProvider () {
67
- return array (array ('mockArgument ' ));
68
- }
69
-
70
66
/**
71
67
* @maximumDuration 200
68
+ *
72
69
* @dataProvider mockDataProvider
73
70
*/
74
71
public function testSleeperSleepsShorterThanMaximumDurationFromAnnotationWithNumericDataProvider (): void
@@ -82,12 +79,14 @@ public function testSleeperSleepsShorterThanMaximumDurationFromAnnotationWithNum
82
79
self ::assertSame ($ milliseconds , $ sleeper ->milliseconds ());
83
80
}
84
81
85
- public function mockDataProviderWithAssociativeArray () {
86
- return array ('mockTest ' => ['mockData ' ]);
82
+ public static function mockDataProvider ()
83
+ {
84
+ return [['mockArgument ' ]];
87
85
}
88
86
89
87
/**
90
88
* @maximumDuration 200
89
+ *
91
90
* @dataProvider mockDataProviderWithAssociativeArray
92
91
*/
93
92
public function testSleeperSleepsShorterThanMaximumDurationFromAnnotationWithNamedDataProvider (): void
@@ -101,6 +100,11 @@ public function testSleeperSleepsShorterThanMaximumDurationFromAnnotationWithNam
101
100
self ::assertSame ($ milliseconds , $ sleeper ->milliseconds ());
102
101
}
103
102
103
+ public static function mockDataProviderWithAssociativeArray ()
104
+ {
105
+ return ['mockTest ' => ['mockData ' ]];
106
+ }
107
+
104
108
/**
105
109
* @maximumDuration 200
106
110
*/
Original file line number Diff line number Diff line change @@ -63,12 +63,9 @@ public function testSleeperSleepsShorterThanMaximumDurationFromAnnotationWhenTes
63
63
self ::assertSame ($ milliseconds , $ sleeper ->milliseconds ());
64
64
}
65
65
66
- public function mockDataProvider () {
67
- return array (array ('mockArgument ' ));
68
- }
69
-
70
66
/**
71
67
* @maximumDuration 200
68
+ *
72
69
* @dataProvider mockDataProvider
73
70
*/
74
71
public function testSleeperSleepsShorterThanMaximumDurationFromAnnotationWithNumericDataProvider (): void
@@ -82,12 +79,14 @@ public function testSleeperSleepsShorterThanMaximumDurationFromAnnotationWithNum
82
79
self ::assertSame ($ milliseconds , $ sleeper ->milliseconds ());
83
80
}
84
81
85
- public function mockDataProviderWithAssociativeArray () {
86
- return array ('mockTest ' => ['mockData ' ]);
82
+ public static function mockDataProvider ()
83
+ {
84
+ return [['mockArgument ' ]];
87
85
}
88
86
89
87
/**
90
88
* @maximumDuration 200
89
+ *
91
90
* @dataProvider mockDataProviderWithAssociativeArray
92
91
*/
93
92
public function testSleeperSleepsShorterThanMaximumDurationFromAnnotationWithNamedDataProvider (): void
@@ -101,6 +100,11 @@ public function testSleeperSleepsShorterThanMaximumDurationFromAnnotationWithNam
101
100
self ::assertSame ($ milliseconds , $ sleeper ->milliseconds ());
102
101
}
103
102
103
+ public static function mockDataProviderWithAssociativeArray ()
104
+ {
105
+ return ['mockTest ' => ['mockData ' ]];
106
+ }
107
+
104
108
/**
105
109
* @maximumDuration 200
106
110
*/
Original file line number Diff line number Diff line change @@ -61,12 +61,9 @@ public function testSleeperSleepsShorterThanMaximumDurationFromAnnotationWhenTes
61
61
self ::assertSame ($ milliseconds , $ sleeper ->milliseconds ());
62
62
}
63
63
64
- public function mockDataProvider () {
65
- return array (array ('mockArgument ' ));
66
- }
67
-
68
64
/**
69
65
* @maximumDuration 200
66
+ *
70
67
* @dataProvider mockDataProvider
71
68
*/
72
69
public function testSleeperSleepsShorterThanMaximumDurationFromAnnotationWithNumericDataProvider (): void
@@ -80,12 +77,14 @@ public function testSleeperSleepsShorterThanMaximumDurationFromAnnotationWithNum
80
77
self ::assertSame ($ milliseconds , $ sleeper ->milliseconds ());
81
78
}
82
79
83
- public function mockDataProviderWithAssociativeArray () {
84
- return array ('mockTest ' => ['mockData ' ]);
80
+ public static function mockDataProvider ()
81
+ {
82
+ return [['mockArgument ' ]];
85
83
}
86
84
87
85
/**
88
86
* @maximumDuration 200
87
+ *
89
88
* @dataProvider mockDataProviderWithAssociativeArray
90
89
*/
91
90
public function testSleeperSleepsShorterThanMaximumDurationFromAnnotationWithNamedDataProvider (): void
@@ -99,6 +98,11 @@ public function testSleeperSleepsShorterThanMaximumDurationFromAnnotationWithNam
99
98
self ::assertSame ($ milliseconds , $ sleeper ->milliseconds ());
100
99
}
101
100
101
+ public static function mockDataProviderWithAssociativeArray ()
102
+ {
103
+ return ['mockTest ' => ['mockData ' ]];
104
+ }
105
+
102
106
/**
103
107
* @maximumDuration 200
104
108
*/
Original file line number Diff line number Diff line change @@ -61,12 +61,9 @@ public function testSleeperSleepsShorterThanMaximumDurationFromAnnotationWhenTes
61
61
self ::assertSame ($ milliseconds , $ sleeper ->milliseconds ());
62
62
}
63
63
64
- public function mockDataProvider () {
65
- return array (array ('mockArgument ' ));
66
- }
67
-
68
64
/**
69
65
* @maximumDuration 200
66
+ *
70
67
* @dataProvider mockDataProvider
71
68
*/
72
69
public function testSleeperSleepsShorterThanMaximumDurationFromAnnotationWithNumericDataProvider (): void
@@ -80,12 +77,14 @@ public function testSleeperSleepsShorterThanMaximumDurationFromAnnotationWithNum
80
77
self ::assertSame ($ milliseconds , $ sleeper ->milliseconds ());
81
78
}
82
79
83
- public function mockDataProviderWithAssociativeArray () {
84
- return array ('mockTest ' => ['mockData ' ]);
80
+ public static function mockDataProvider ()
81
+ {
82
+ return [['mockArgument ' ]];
85
83
}
86
84
87
85
/**
88
86
* @maximumDuration 200
87
+ *
89
88
* @dataProvider mockDataProviderWithAssociativeArray
90
89
*/
91
90
public function testSleeperSleepsShorterThanMaximumDurationFromAnnotationWithNamedDataProvider (): void
@@ -99,6 +98,11 @@ public function testSleeperSleepsShorterThanMaximumDurationFromAnnotationWithNam
99
98
self ::assertSame ($ milliseconds , $ sleeper ->milliseconds ());
100
99
}
101
100
101
+ public static function mockDataProviderWithAssociativeArray ()
102
+ {
103
+ return ['mockTest ' => ['mockData ' ]];
104
+ }
105
+
102
106
/**
103
107
* @maximumDuration 200
104
108
*/
You can’t perform that action at this time.
0 commit comments