【文件属性】:
文件名称:文本处理的PHP库.zip
文件大小:8KB
文件格式:ZIP
更新时间:2022-07-31 04:00:24
类库下载-文本处理的PHP库
文本处理工具多线程操作,测试10万行文字替换、分割、取出暂无错误,分割、取出较慢,替换较快<?php
use KzykHys\Text\Text;
/**
* @author Kazuyuki Hayashi
*/
class TextTest extends \PHPUnit_Framework_TestCase
{
public function testInitialize()
{
$constructed_text = new Text('foo');
$this->assertInstanceOf('KzykHys\Text\Text', $constructed_text);
$created_text = Text::create('foo');
$this->assertInstanceOf('KzykHys\Text\Text', $created_text);
$this->assertEquals($constructed_text, $created_text);
}
public function testAppend()
{
$text = new Text('foo');
$this->assertEquals('foobar', $text->append('bar'));
}
public function testPrepend()
{
$text = new Text('foo');
$this->assertEquals('barfoo', $text->prepend('bar'));
}
【文件预览】:
Text-master
----composer.json(389B)
----.travis.yml(368B)
----test()
--------KzykHys()
----src()
--------KzykHys()
----.gitignore(30B)
----phpunit.xml.dist(823B)
----README.md(5KB)