blob: d23fec360dd359c425e34fb7592588cf85ac2e33 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
<?php
Prado::using('System.IO.TTextWriter');
/**
* @package System.IO
*/
class TTextWriterTest extends PHPUnit_Framework_TestCase {
public function testFlush() {
$writer = new TTextWriter();
self::assertEquals('', $writer->flush());
$writer->write('some text');
self::assertEquals('some text', $writer->flush());
}
public function testWrite() {
$writer = new TTextWriter();
$writer->write("some text\n");
$writer->write("more text\n");
self::assertEquals("some text\nmore text\n", $writer->flush());
}
public function testWriteLine() {
$writer = new TTextWriter();
$writer->writeLine('some text');
self::assertEquals("some text\n", $writer->flush());
}
}
?>
|