graychen / generatestring
generate a little string
Installs: 2 555
Dependents: 2
Suggesters: 0
Security: 0
Stars: 2
Watchers: 2
Forks: 0
Open Issues: 0
Requires (Dev)
- phpunit/phpunit: 4.8.1
This package is not auto-updated.
Last update: 2024-11-10 02:40:02 UTC
README
how to use
<?php namespace graychen\Test; use graychen\generatestring; class generatestringTest extends \PHPUnit_Framework_TestCase { private $string; public function setUp() { $this->string=new generatestring(); } public function testGetchars() { $result = $this->string->getchars("a", 10); $this->assertEquals('aaaaaaaaaa', $result); } public function testGetchars_t() { $result = $this->string->getchars_t("abc", 10); $this->assertEquals('abcabcabcabcabcabcabcabcabcabc', $result); } public function testGetchars_p() { $result = $this->string->getchars_p("abc", 10); $this->assertEquals('abcabcabcabcabcabcabcabcabcabc', $result); } public function testGetcharscmp() { $result = $this->string->getcharscmp("abc", 10); $this->assertEquals('abcabcabca', $result); } public function testGetchars_s() { $result = $this->string->getchars_s("abc", 10); $this->assertEquals('abcabcabcabcabcabcabcabcabcabc', $result); } }