コード例 #1
0
ファイル: AssetTest.php プロジェクト: glynnforrest/neptune
 public function testGetContentLength()
 {
     $a = new Asset($this->file);
     $this->assertSame(7, $a->getContentLength());
     $a->setContent('foo_bar_baz');
     $this->assertSame(11, $a->getContentLength());
 }
コード例 #2
0
ファイル: FilterTest.php プロジェクト: glynnforrest/neptune
 public function testFilterAsset()
 {
     $a = new Asset();
     $a->setContent('content');
     $f = new UpperCaseFilter();
     $f->filterAsset($a);
     $this->assertEquals('CONTENT', $a->getContent());
 }
コード例 #3
0
 public function filterAsset(Asset &$a)
 {
     $a->setContent(strtoupper($a->getContent()));
 }