Commit: 3e0a559c6416dcdaf3f240933d17cda8f3dac38b

Author: alkemann | Date: 2009-11-17 21:52:57 +0100
returned out commented extra filter test to `PasteTest`
diff --git a/tests/cases/models/PasteTest.php b/tests/cases/models/PasteTest.php index 0b2d467..fcedada 100644 --- a/tests/cases/models/PasteTest.php +++ b/tests/cases/models/PasteTest.php @@ -174,7 +174,29 @@ class PasteTest extends \lithium\test\Unit { $result = $paste->errors->data(); $this->assertEqual($expected, $result); } + /* + public function testApplyingFilter() { + MockPaste::applyFilter('save', function($self, $params, $chain) { + $document = $params['record']; + if ($document->language != 'text' && + in_array($document->language, MockPaste::$languages)) { + $document = MockPaste::mockParse($document); + } + return $document ; + }); + $data = array( + 'content' => 'echo $this->function("lol");', + 'author' => 'TomGood', + 'language' => 'php' + ); + $paste = MockPaste::create($data); + $result = $paste->save(); + + $expected = 'PARSED'; + $this->assertEqual($expected, $result->parsed); + } + */ public function testGeShiFilter() { MockPaste::applyFilter('save', function($self, $params, $chain) { $document = $params['record'];