Make svn_log_limit more resilient against empty cache entries.
[xhtml-compiler.git] / tests / XHTMLCompiler / FileTest.php
blob0ac2134274b2c8d2a7d5c86f0e954cc689714113
1 <?php
3 class XHTMLCompiler_FileTest extends XHTMLCompiler_FileSystemHarness
6 function test() {
7 $name = 'test.txt';
8 $file = new XHTMLCompiler_File($name);
9 $this->assertFalse($file->exists());
10 $file->write('foobar');
11 $this->assertTrue($file->exists());
12 $this->assertEqual($file->get(), 'foobar');
13 $file->delete();
14 $this->assertFalse($file->exists());
17 function testGetNonExistent() {
18 $name = 'notfound.txt';
19 $file = new XHTMLCompiler_File($name);
20 $this->expectError();
21 $this->assertFalse($file->get());