修改理由:

asset -> assert

相关信息:


此投稿已在 5年前 合并。

内容修改:

红色背景 为原始内容

绿色背景 为新增或者修改的内容

OldNewDifferences
159159
160160       $w->getWeather('深圳', 'foo');
161161
162        $this->fail('Faild to asset getWeather throw exception with invalid argument.');
 162       $this->fail('Faild to assert getWeather throw exception with invalid argument.');
163163   }
164164   
165165   // 检查 $format 参数
 
177177       $w->getWeather('深圳', 'base', 'array');
178178
179179       // 如果没有抛出异常,就会运行到这行,标记当前测试没成功
180        $this->fail('Faild to asset getWeather throw exception with invalid argument.'); 
 180       $this->fail('Faild to assert getWeather throw exception with invalid argument.'); 
181181   }
182182   .
183183   .
 
448448
449449       $w->getWeather('深圳', 'foo');
450450
451        $this->fail('Faild to asset getWeather throw exception with invalid argument.');
 451       $this->fail('Faild to assert getWeather throw exception with invalid argument.');
452452   }
453453
454454   public function testGetWeatherWithInvalidFormat()
 
460460
461461       $w->getWeather('深圳', 'base', 'array');
462462
463        $this->fail('Faild to asset getWeather throw exception with invalid argument.');
 463       $this->fail('Faild to assert getWeather throw exception with invalid argument.');
464464   }
465465
466466   public function testGetWeather()