| @@ 312-319 (lines=8) @@ | ||
| 309 | $this->assertEquals($expected, $msg); |
|
| 310 | } |
|
| 311 | ||
| 312 | public function testReplaceStringStartingWithSpaces() |
|
| 313 | { |
|
| 314 | $string = "This is a string"; |
|
| 315 | $expected = "This is a string"; |
|
| 316 | $foo = new testType(); |
|
| 317 | $result = $foo->replaceString($string); |
|
| 318 | $this->assertEquals($expected, $result); |
|
| 319 | } |
|
| 320 | ||
| 321 | public function testReplaceStringStartingWithTabs() |
|
| 322 | { |
|
| @@ 321-328 (lines=8) @@ | ||
| 318 | $this->assertEquals($expected, $result); |
|
| 319 | } |
|
| 320 | ||
| 321 | public function testReplaceStringStartingWithTabs() |
|
| 322 | { |
|
| 323 | $string = "This\tis\ta\tstring"; |
|
| 324 | $expected = "This is a string"; |
|
| 325 | $foo = new testType(); |
|
| 326 | $result = $foo->replaceString($string); |
|
| 327 | $this->assertEquals($expected, $result); |
|
| 328 | } |
|
| 329 | ||
| 330 | public function testReplaceStringStartingWithNuLines() |
|
| 331 | { |
|
| @@ 330-337 (lines=8) @@ | ||
| 327 | $this->assertEquals($expected, $result); |
|
| 328 | } |
|
| 329 | ||
| 330 | public function testReplaceStringStartingWithNuLines() |
|
| 331 | { |
|
| 332 | $string = "This\nis\na\nstring"; |
|
| 333 | $expected = "This is a string"; |
|
| 334 | $foo = new testType(); |
|
| 335 | $result = $foo->replaceString($string); |
|
| 336 | $this->assertEquals($expected, $result); |
|
| 337 | } |
|
| 338 | ||
| 339 | public function testReplaceStringWithPadding() |
|
| 340 | { |
|
| @@ 339-346 (lines=8) @@ | ||
| 336 | $this->assertEquals($expected, $result); |
|
| 337 | } |
|
| 338 | ||
| 339 | public function testReplaceStringWithPadding() |
|
| 340 | { |
|
| 341 | $string = " This is a string "; |
|
| 342 | $expected = " This is a string "; |
|
| 343 | $foo = new testType(); |
|
| 344 | $result = $foo->replaceString($string); |
|
| 345 | $this->assertEquals($expected, $result); |
|
| 346 | } |
|
| 347 | ||
| 348 | public function testCollapseStringWithSpacesAndPadding() |
|
| 349 | { |
|
| @@ 348-355 (lines=8) @@ | ||
| 345 | $this->assertEquals($expected, $result); |
|
| 346 | } |
|
| 347 | ||
| 348 | public function testCollapseStringWithSpacesAndPadding() |
|
| 349 | { |
|
| 350 | $string = " This is a string "; |
|
| 351 | $expected = "This is a string"; |
|
| 352 | $foo = new testType(); |
|
| 353 | $result = $foo->collapseString($string); |
|
| 354 | $this->assertEquals($expected, $result); |
|
| 355 | } |
|
| 356 | } |
|
| 357 | ||