lithium\tests\cases\data\ModelTest::testFilteredFind PHP Method

testFilteredFind() public method

public testFilteredFind ( )
    public function testFilteredFind()
    {
        MockComment::applyFilter('find', function ($self, $params, $chain) {
            $result = $chain->next($self, $params, $chain);
            if ($result !== null) {
                $result->filtered = true;
            }
            return $result;
        });
        $result = MockComment::first();
        $this->assertTrue($result->filtered);
    }
ModelTest