Faild -> Failed
rovast
5年前
修改理由:
相关信息:
- 类型:教程文章
- 文章: 编写单元测试
- 课程: 《LX2 PHP 扩展包实战教程 - 从入门到发布()》
此投稿已在 5年前 合并。
内容修改:
Old | New | Differences |
---|---|---|
154 | 154 | |
155 | 155 | $w->getWeather('深圳', 'foo'); |
156 | 156 | |
157 | $this->fail('Fail | |
157 | $this->fail('Failed to assert getWeather throw exception with invalid argument.'); | |
158 | 158 | } |
159 | 159 | |
160 | 160 | // 检查 $format 参数 | … | … |
172 | 172 | $w->getWeather('深圳', 'base', 'array'); |
173 | 173 | |
174 | 174 | // 如果没有抛出异常,就会运行到这行,标记当前测试没成功 |
175 | $this->fail('Fail | |
175 | $this->fail('Failed to assert getWeather throw exception with invalid argument.'); | |
176 | 176 | } |
177 | 177 | . |
178 | 178 | . | … | … |
443 | 443 | |
444 | 444 | $w->getWeather('深圳', 'foo'); |
445 | 445 | |
446 | $this->fail('Fail | |
446 | $this->fail('Failed to assert getWeather throw exception with invalid argument.'); | |
447 | 447 | } |
448 | 448 | |
449 | 449 | public function testGetWeatherWithInvalidFormat() | … | … |
455 | 455 | |
456 | 456 | $w->getWeather('深圳', 'base', 'array'); |
457 | 457 | |
458 | $this->fail('Fail | |
458 | $this->fail('Failed to assert getWeather throw exception with invalid argument.'); | |
459 | 459 | } |
460 | 460 | |
461 | 461 | public function testGetWeather() |