Debian Codegraph @

extensions/Scribunto/tests/phpunit/Engines/LuaCommon/CommonTests-lib.lua

raw symbols SCIP
1 local p = {}
2 local php
3 local options
4
5 function p.setupInterface( opts )
6 -- Boilerplate
7 p.setupInterface = nil
8 php = mw_interface
9 mw_interface = nil
10 options = opts
11
12 -- Loaded dynamically, don't mess with globals like 'mw' or
13 -- 'package.loaded'
14 end
15
16 function p.test()
17 return options.test, php.test()
18 end
19
20 function p.setVal( frame )
21 options.val = frame.args[1]
22 end
23
24 function p.getVal( frame )
25 return tostring( options.val )
26 end
27
28 p.foobar = { val = "nope" }
29
30 return p