Пример #1
0
	/**
	 * 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
0
 /**
  * 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
0
 /**
  * @testdox  Test that setLineEnd with a custom param returns an instance of $this
  */
 public function testEnsureSetLineEndCustomReturnsThisObject()
 {
     $this->assertSame($this->object, $this->object->setLineEnd('special'));
 }