@@ -90,31 +90,31 @@ public function testGenerate()
90
90
$ this ->ioObjectMock ->expects ($ this ->once ())
91
91
->method ('makeResultFileDirectory ' )
92
92
->with ($ this ->getResultClassName ())
93
- ->will ( $ this -> returnValue ( true ) );
93
+ ->willReturn ( true );
94
94
95
95
//Mocking _generateCode call
96
96
$ this ->classGenerator ->expects ($ this ->once ())
97
97
->method ('setName ' )
98
98
->with ($ this ->getResultClassName ())
99
- ->will ( $ this -> returnSelf () );
99
+ ->willReturnSelf ( );
100
100
$ this ->classGenerator ->expects ($ this ->once ())
101
101
->method ('addProperties ' )
102
- ->will ( $ this -> returnSelf () );
102
+ ->willReturnSelf ( );
103
103
$ this ->classGenerator ->expects ($ this ->once ())
104
104
->method ('addMethods ' )
105
- ->will ( $ this -> returnSelf () );
105
+ ->willReturnSelf ( );
106
106
$ this ->classGenerator ->expects ($ this ->once ())
107
107
->method ('setClassDocBlock ' )
108
- ->will ( $ this -> returnSelf () );
108
+ ->willReturnSelf ( );
109
109
$ this ->classGenerator ->expects ($ this ->once ())
110
110
->method ('generate ' )
111
- ->will ( $ this -> returnValue ( $ generatedCode) );
111
+ ->willReturn ( $ generatedCode );
112
112
113
113
//Mocking generation
114
114
$ this ->ioObjectMock ->expects ($ this ->any ())
115
115
->method ('getResultFileName ' )
116
116
->with ($ this ->getResultClassName ())
117
- ->will ( $ this -> returnValue ( $ resultFileName) );
117
+ ->willReturn ( $ resultFileName );
118
118
$ this ->ioObjectMock ->expects ($ this ->once ())
119
119
->method ('writeResultFile ' )
120
120
->with ($ resultFileName , $ generatedCode );
0 commit comments