@@ -157,15 +157,15 @@ |
||
157 | 157 | |
158 | 158 | public function setUp() { |
159 | 159 | $this->question = $this->getMockBuilder('\common\models\Question') |
160 | - ->setMethods(['save', 'attributes']) |
|
161 | - ->getMock(); |
|
160 | + ->setMethods(['save', 'attributes']) |
|
161 | + ->getMock(); |
|
162 | 162 | } |
163 | 163 | |
164 | 164 | public function testParseQuestionData() { |
165 | 165 | $questions = array_map(function ($d) { |
166 | 166 | $q = $this->getMockBuilder('\common\models\Question') |
167 | - ->setMethods(['save', 'attributes']) |
|
168 | - ->getMock(); |
|
167 | + ->setMethods(['save', 'attributes']) |
|
168 | + ->getMock(); |
|
169 | 169 | $q->method('save')->willReturn(true); |
170 | 170 | $q->method('attributes') |
171 | 171 | ->willReturn([ |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | } |
163 | 163 | |
164 | 164 | public function testParseQuestionData() { |
165 | - $questions = array_map(function ($d) { |
|
165 | + $questions = array_map(function($d) { |
|
166 | 166 | $q = $this->getMockBuilder('\common\models\Question') |
167 | 167 | ->setMethods(['save', 'attributes']) |
168 | 168 | ->getMock(); |
@@ -179,8 +179,8 @@ discard block |
||
179 | 179 | 'date', |
180 | 180 | 'userBehavior', |
181 | 181 | ]); |
182 | - foreach($d as $k => $v) { |
|
183 | - if($k === 'behavior_id' && $v === null) { |
|
182 | + foreach ($d as $k => $v) { |
|
183 | + if ($k === 'behavior_id' && $v === null) { |
|
184 | 184 | $ub = new \StdClass(); |
185 | 185 | $ub->custom_behavior = 'some_custom_behavior'; |
186 | 186 | $q->userBehavior = $ub; |