本文整理汇总了PHP中JDocument::setLineEnd方法的典型用法代码示例。如果您正苦于以下问题:PHP JDocument::setLineEnd方法的具体用法?PHP JDocument::setLineEnd怎么用?PHP JDocument::setLineEnd使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JDocument
的用法示例。
在下文中一共展示了JDocument::setLineEnd方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testSetLineEnd
/**
* Test...
*
* @covers JDocument::setLineEnd
*
* @return void
*/
public function testSetLineEnd()
{
$this->object = new JDocument;
$this->object->setLineEnd('win');
$this->assertThat(
$this->object->_lineEnd,
$this->equalTo("\15\12")
);
$this->object->setLineEnd('unix');
$this->assertThat(
$this->object->_lineEnd,
$this->equalTo("\12")
);
$this->object->setLineEnd('mac');
$this->assertThat(
$this->object->_lineEnd,
$this->equalTo("\15")
);
$this->object->setLineEnd('<br />');
$this->assertThat(
$this->object->_lineEnd,
$this->equalTo("<br />")
);
}
示例2: testSetLineEnd
/**
* Test...
*
* @return void
*/
public function testSetLineEnd()
{
$this->object->setLineEnd('win');
$this->assertThat($this->object->_lineEnd, $this->equalTo("\r\n"));
$this->object->setLineEnd('unix');
$this->assertThat($this->object->_lineEnd, $this->equalTo("\n"));
$this->object->setLineEnd('mac');
$this->assertThat($this->object->_lineEnd, $this->equalTo("\r"));
$this->object->setLineEnd('<br />');
$this->assertThat($this->object->_lineEnd, $this->equalTo("<br />"));
}
示例3: testEnsureSetLineEndCustomReturnsThisObject
/**
* @testdox Test that setLineEnd with a custom param returns an instance of $this
*/
public function testEnsureSetLineEndCustomReturnsThisObject()
{
$this->assertSame($this->object, $this->object->setLineEnd('special'));
}