Module:Template test case: Difference between revisions

    (start creating Invocation classes for getting template invocations from the arguments)
    (add getInvocation and getOutput methods for the TableInvocation class)
    Line 135: Line 135:
    end
    end


    function NowikiInvocation:getInvocation(template)
    function TableInvocation:getInvocation(template)
    return require('Module:Template invocation').invocation(
    template,
    self.invokeArgs
    )
    end
    end


    function NowikiInvocation:getOutput(template)
    function TableInvocation:getOutput(template)
    return mw.getCurrentFrame():expandTemplate{
    title = template,
    args = self.invokeArgs
    }
    end
    end