lithium\tests\cases\data\EntityTest::testMethodDispatchWithEntityAsModel PHP Method

testMethodDispatchWithEntityAsModel() public method

    public function testMethodDispatchWithEntityAsModel()
    {
        $data = array('foo' => true);
        $model = 'lithium\\data\\Entity';
        $entity = new Entity(compact('model', 'data'));
        $this->assertException("/^No model bound to call `foo`.\$/", function () use($entity) {
            $entity->foo();
        });
    }