本文整理汇总了PHP中Jam::find_insist方法的典型用法代码示例。如果您正苦于以下问题:PHP Jam::find_insist方法的具体用法?PHP Jam::find_insist怎么用?PHP Jam::find_insist使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Jam
的用法示例。
在下文中一共展示了Jam::find_insist方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: action_move
public function action_move()
{
$item = Jam::find_insist($this->request->query('model'), $this->request->query('from'));
$second_item = Jam::find_insist($this->request->query('model'), $this->request->query('to'));
$item->move_position_to($second_item);
$this->response->body('OK');
}
示例2: test_set_null_and_save
public function test_set_null_and_save()
{
$author = Jam::find_insist('test_author', 1);
$author->test_post = NULL;
$author->save();
$this->assertNull($author->test_post);
}
示例3: test_find_insist_notfound_array
/**
* @expectedException Jam_Exception_Notfound
*/
public function test_find_insist_notfound_array()
{
Jam::find_insist('test_blog', array(1, 47583475));
}
示例4: test_add_purchase_item_refund
/**
* @covers Model_Brand_Refund::add_purchase_item_refund
*/
public function test_add_purchase_item_refund()
{
$brand_purchase = Jam::find_insist('brand_purchase', 1);
$refund = $brand_purchase->refunds->build(array('items' => array(array('purchase_item' => $brand_purchase->items[0]))));
$this->assertSame(0, $brand_purchase->items_count('refund'));
$refund->add_purchase_item_refund();
$brand_purchase->revert();
$this->assertSame(1, $brand_purchase->items_count('refund'));
$this->assertEquals($refund->amount()->multiply_by(-1), $brand_purchase->total_price('refund'));
}