testinstanceof(datadirs=>dirname(File::Spec->rel2abs(FILE__)),);$app->isa("MT::App::CMS");#=>truemodelclassfortestingmy$entryclass=$app->testmodel("entry");fetchingentrythathasnotstored.my$entrytosave=$entryclass->testloadvolatiles("tosave");$entrytosave->save();loadinga"context"fortest$app->testtemplateloadcontext("ctx1"),buildingtag$entrytitle=$app->testtemplate_build("mt:EntryTitle");buildingtagbyphp$entrytitle=$app->testph-IMDN开发者社群-imdn.cn"> testinstanceof(datadirs=>dirname(File::Spec->rel2abs(FILE__)),);$app->isa("MT::App::CMS");#=>truemodelclassfortestingmy$entryclass=$app->testmodel("entry");fetchingentrythathasnotstored.my$entrytosave=$entryclass->testloadvolatiles("tosave");$entrytosave->save();loadinga"context"fortest$app->testtemplateloadcontext("ctx1"),buildingtag$entrytitle=$app->testtemplate_build("mt:EntryTitle");buildingtagbyphp$entrytitle=$app->testph - IMDN开发者社群-imdn.cn">
登录
首页 » 其他 » 可移动式的实用程序,用于测试

可移动式的实用程序,用于测试

于 2023-09-07 发布 文件大小:14.14 kB
0 18
下载积分: 2 下载次数: 1

代码说明:

NAME MT::App::Test - Movable Type"s utility for test SYNOPSIS ``` use MT::App::Test; use File::Basename qw( dirname ); use File::Spec; createing test app object $app = MT::App::Test->testinstanceof( datadirs => dirname(File::Spec->rel2abs(FILE__)), ); $app->isa("MT::App::CMS"); # => true model class for testing my $entryclass = $app->testmodel("entry"); fetching entry that has not stored. my $entrytosave = $entryclass->testloadvolatiles("tosave"); $entrytosave->save(); loading a "context" for test $app->testtemplateloadcontext("ctx1"), building tag $entrytitle = $app->testtemplate_build("mt:EntryTitle"); building tag by php $entrytitle = $app->testph

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • 696518资源总数
  • 104225会员总数
  • 32今日下载