|
@@ 279-286 (lines=8) @@
|
| 276 |
|
* @param string $expected |
| 277 |
|
* @param integer $actual |
| 278 |
|
*/ |
| 279 |
|
public function assert_equal($expected, $actual, $debug = null) |
| 280 |
|
{ |
| 281 |
|
if ($expected != $actual) { |
| 282 |
|
throw new Kohana_Unit_Test_Exception(Kohana::lang('unit_test.assert_equal', gettype($expected), var_export($expected, true), gettype($actual), var_export($actual, true)), $debug); |
| 283 |
|
} |
| 284 |
|
|
| 285 |
|
return $this; |
| 286 |
|
} |
| 287 |
|
|
| 288 |
|
/** |
| 289 |
|
* @param string $expected |
|
@@ 292-299 (lines=8) @@
|
| 289 |
|
* @param string $expected |
| 290 |
|
* @param integer $actual |
| 291 |
|
*/ |
| 292 |
|
public function assert_not_equal($expected, $actual, $debug = null) |
| 293 |
|
{ |
| 294 |
|
if ($expected == $actual) { |
| 295 |
|
throw new Kohana_Unit_Test_Exception(Kohana::lang('unit_test.assert_not_equal', gettype($expected), var_export($expected, true), gettype($actual), var_export($actual, true)), $debug); |
| 296 |
|
} |
| 297 |
|
|
| 298 |
|
return $this; |
| 299 |
|
} |
| 300 |
|
|
| 301 |
|
/** |
| 302 |
|
* @param string $expected |
|
@@ 305-312 (lines=8) @@
|
| 302 |
|
* @param string $expected |
| 303 |
|
* @param string $actual |
| 304 |
|
*/ |
| 305 |
|
public function assert_same($expected, $actual, $debug = null) |
| 306 |
|
{ |
| 307 |
|
if ($expected !== $actual) { |
| 308 |
|
throw new Kohana_Unit_Test_Exception(Kohana::lang('unit_test.assert_same', gettype($expected), var_export($expected, true), gettype($actual), var_export($actual, true)), $debug); |
| 309 |
|
} |
| 310 |
|
|
| 311 |
|
return $this; |
| 312 |
|
} |
| 313 |
|
|
| 314 |
|
/** |
| 315 |
|
* @param string $expected |
|
@@ 318-325 (lines=8) @@
|
| 315 |
|
* @param string $expected |
| 316 |
|
* @param integer $actual |
| 317 |
|
*/ |
| 318 |
|
public function assert_not_same($expected, $actual, $debug = null) |
| 319 |
|
{ |
| 320 |
|
if ($expected === $actual) { |
| 321 |
|
throw new Kohana_Unit_Test_Exception(Kohana::lang('unit_test.assert_not_same', gettype($expected), var_export($expected, true), gettype($actual), var_export($actual, true)), $debug); |
| 322 |
|
} |
| 323 |
|
|
| 324 |
|
return $this; |
| 325 |
|
} |
| 326 |
|
|
| 327 |
|
/** |
| 328 |
|
* @param boolean $value |