alt and title methods

This commit is contained in:
John Bintz 2010-02-11 18:02:23 -05:00
parent 3511ae9b42
commit 45e432c824
2 changed files with 12 additions and 2 deletions

View File

@ -29,8 +29,8 @@ class ComicPressBackendFilesystem extends ComicPressBackend {
}
function file($size = null) { return $this->files_by_type[$this->ensure_type($size)]; }
function alt() {}
function title() {}
function alt() { return $this->alt_text; }
function title() { return $this->title_text; }
}
class ComicPressBackendFilesystemFactory {

View File

@ -67,4 +67,14 @@ class ComicPressBackendFilesystemTest extends PHPUnit_Framework_TestCase {
$this->assertEquals('file', $fs->file('type'));
}
function testAlt() {
$this->fs->alt_text = 'text';
$this->assertEquals('text', $this->fs->alt());
}
function testTitle() {
$this->fs->title_text = 'text';
$this->assertEquals('text', $this->fs->title());
}
}