diff --git a/lib/Cake/Test/Case/Utility/CakeTextTest.php b/lib/Cake/Test/Case/Utility/CakeTextTest.php index 7eface6e9e2..2e085c39afe 100644 --- a/lib/Cake/Test/Case/Utility/CakeTextTest.php +++ b/lib/Cake/Test/Case/Utility/CakeTextTest.php @@ -19,17 +19,28 @@ App::uses('CakeText', 'Utility'); /** - * CakeTextTest class + * CakeText Tests * - * @package Cake.Test.Case.Utility + * @package Cake.Test.Case.Utility + * @coversDefaultClass CakeText */ class CakeTextTest extends CakeTestCase { +/** + * Setup object under test + * + * @return void + */ public function setUp() { parent::setUp(); $this->Text = new CakeText(); } +/** + * Tear down object under test + * + * @return void + */ public function tearDown() { parent::tearDown(); unset($this->Text); @@ -39,6 +50,7 @@ public function tearDown() { * testUuidGeneration method * * @return void + * @covers ::uuid */ public function testUuidGeneration() { $result = CakeText::uuid(); @@ -51,6 +63,7 @@ public function testUuidGeneration() { * testMultipleUuidGeneration method * * @return void + * @covers ::uuid */ public function testMultipleUuidGeneration() { $check = array(); @@ -70,6 +83,7 @@ public function testMultipleUuidGeneration() { * testInsert method * * @return void + * @covers ::insert */ public function testInsert() { $string = 'some string'; @@ -231,6 +245,7 @@ public function testInsert() { * test Clean Insert * * @return void + * @covers ::cleanInsert */ public function testCleanInsert() { $result = CakeText::cleanInsert(':incomplete', array( @@ -271,6 +286,7 @@ public function testCleanInsert() { * CakeText::insert(). * * @return void + * @covers ::insert */ public function testAutoIgnoreBadInsertData() { $data = array('foo' => 'alpha', 'bar' => 'beta', 'fale' => array()); @@ -282,6 +298,7 @@ public function testAutoIgnoreBadInsertData() { * testTokenize method * * @return void + * @covers ::tokenize */ public function testTokenize() { $result = CakeText::tokenize('A,(short,boring test)'); @@ -318,6 +335,7 @@ public function testTokenize() { * testReplaceWithQuestionMarkInString method * * @return void + * @covers ::insert */ public function testReplaceWithQuestionMarkInString() { $string = ':a, :b and :c?'; @@ -331,6 +349,8 @@ public function testReplaceWithQuestionMarkInString() { * * @dataProvider wordWrapProvider * @return void + * @covers ::wordWrap + * @covers ::_wordWrap */ public function testWordWrap($text, $width, $break = "\n", $cut = false) { $result = CakeText::wordWrap($text, $width, $break, $cut); @@ -364,6 +384,8 @@ public function wordWrapProvider() { * test that wordWrap() properly handle unicode strings. * * @return void + * @covers ::wordWrap + * @covers ::_wordWrap */ public function testWordWrapUnicodeAware() { $text = 'Но вим омниюм факёльиси элыктрам, мюнырэ лэгыры векж ыт. Выльёт квюандо нюмквуам ты кюм. Зыд эю рыбюм.'; @@ -391,6 +413,8 @@ public function testWordWrapUnicodeAware() { * test that wordWrap() properly handle newline characters. * * @return void + * @covers ::wordWrap + * @covers ::_wordWrap */ public function testWordWrapNewlineAware() { $text = 'This is a line that is almost the 55 chars long. @@ -408,6 +432,9 @@ public function testWordWrapNewlineAware() { * test wrap method. * * @return void + * @covers ::wrap + * @covers ::wordWrap + * @covers ::_wordWrap */ public function testWrap() { $text = 'This is the song that never ends. This is the song that never ends. This is the song that never ends.'; @@ -443,6 +470,9 @@ public function testWrap() { * test wrap() indenting * * @return void + * @covers ::wrap + * @covers ::wordWrap + * @covers ::_wordWrap */ public function testWrapIndent() { $text = 'This is the song that never ends. This is the song that never ends. This is the song that never ends.'; @@ -459,6 +489,7 @@ public function testWrapIndent() { * testTruncate method * * @return void + * @covers ::truncate */ public function testTruncate() { $text1 = 'The quick brown fox jumps over the lazy dog'; @@ -564,6 +595,7 @@ public function testTruncate() { * testTruncate method with non utf8 sites * * @return void + * @covers ::truncate */ public function testTruncateLegacy() { Configure::write('App.encoding', 'ISO-8859-1'); @@ -587,6 +619,7 @@ public function testTruncateLegacy() { * testTail method * * @return void + * @covers ::tail */ public function testTail() { $text1 = 'The quick brown fox jumps over the lazy dog'; @@ -630,6 +663,7 @@ public function testTail() { * testHighlight method * * @return void + * @covers ::highlight */ public function testHighlight() { $text = 'This is a test text'; @@ -664,6 +698,7 @@ public function testHighlight() { * testHighlightHtml method * * @return void + * @covers ::highlight */ public function testHighlightHtml() { $text1 = '

strongbow isn’t real cider

'; @@ -690,6 +725,7 @@ public function testHighlightHtml() { * testHighlightMulti method * * @return void + * @covers ::highlight */ public function testHighlightMulti() { $text = 'This is a test text'; @@ -703,6 +739,7 @@ public function testHighlightMulti() { * testStripLinks method * * @return void + * @covers ::stripLinks */ public function testStripLinks() { $text = 'This is a test text'; @@ -730,6 +767,7 @@ public function testStripLinks() { * testHighlightCaseInsensitivity method * * @return void + * @covers ::highlight */ public function testHighlightCaseInsensitivity() { $text = 'This is a Test text'; @@ -746,6 +784,7 @@ public function testHighlightCaseInsensitivity() { * testExcerpt method * * @return void + * @covers ::excerpt */ public function testExcerpt() { $text = 'This is a phrase with test text to play with'; @@ -786,6 +825,7 @@ public function testExcerpt() { * testExcerptCaseInsensitivity method * * @return void + * @covers ::excerpt */ public function testExcerptCaseInsensitivity() { $text = 'This is a phrase with test text to play with'; @@ -803,6 +843,7 @@ public function testExcerptCaseInsensitivity() { * testListGeneration method * * @return void + * @covers ::toList */ public function testListGeneration() { $result = $this->Text->toList(array());