<?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);
}
}
-
Notifications
You must be signed in to change notification settings - Fork 0
Graychen/generatestring
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
a composer library for generate string
Resources
Stars
Watchers
Forks
Packages 0
No packages published