✏️ 编辑:MemberProfileTest.php
路径:
/virtual/bigbrother/sns/test/unit/model/MemberProfileTest.php
大小:1.37 KB · 修改:2010-08-10 13:59:42 · 权限:0644 · 可写
← 返回目录
👁 查看
⬇ 下载
<?php include_once dirname(__FILE__) . '/../../bootstrap/unit.php'; include_once dirname(__FILE__) . '/../../bootstrap/database.php'; $t = new lime_test(null, new lime_output_color()); //------------------------------------------------------------ $t->diag('MemberProfile::__toString()'); $memberProfile = MemberProfilePeer::retrieveByPK(1); $option = ProfileOptionPeer::retrieveByPk($memberProfile->getProfileOptionId()); $t->cmp_ok((string)$memberProfile, '===', (string)$option->getValue(), '__toString() returns an option'); $memberProfile = MemberProfilePeer::retrieveByPK(2); $t->cmp_ok((string)$memberProfile, '===', (string)$memberProfile->getValue(), '__toString() returns a value'); //------------------------------------------------------------ $t->diag('MemberProfile::getValue()'); $memberProfile = MemberProfilePeer::retrieveByPK(1); $t->cmp_ok($memberProfile->getValue(), '===', 1, 'getValue() returns an option'); $memberProfile = MemberProfilePeer::retrieveByPK(2); $t->cmp_ok($memberProfile->getValue(), '===', 'よろしくお願いします。', 'getValue() returns a value'); //------------------------------------------------------------ $t->diag('Member::hydrateProfiles()'); //------------------------------------------------------------ $t->diag('Member::getName()'); //------------------------------------------------------------ $t->diag('Member::getCaption()');
💾 保存
取消
保存为 UTF-8,换行统一为 LF