Although it might be nice to create extensive tests for every method you write, you must decide how much you can actually do and whether the return will warrant the time you put in.
尽管为每个您撰写的方法创建多种测试是非常不错的,但您必须决定您实际能测试多少,结果是否能体现出您所投入的时间。
I'd also like to show you an example of how you'd set up your plug-in architecture if you decided to write a function, as opposed to a method.
如果您决定编写函数而不是方法,我还将向您展示一个样例,介绍如何设置插件架构。
Listing 14 shows how to invoke the authorize method with permissions to write content.
清单14展示了如何利用权限调用authorize方法,以写入内容。
应用推荐