Add warnings when people attempt to download deprecated versions.
[xhtml-compiler.git] / tests / XHTMLCompiler / FileTest.php
blob852015dfd58323bb4e5cbbd1d690a424ded051e9
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 $this->expectError();
20 $file = new XHTMLCompiler_File($name);
21 $this->assertFalse($file->get());