本文整理匯總了PHP中Cake\ORM\Table::removeBehavior方法的典型用法代碼示例。如果您正苦於以下問題:PHP Table::removeBehavior方法的具體用法?PHP Table::removeBehavior怎麽用?PHP Table::removeBehavior使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Cake\ORM\Table
的用法示例。
在下文中一共展示了Table::removeBehavior方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: tearDown
/**
* tear down
* @return void
*/
public function tearDown()
{
parent::tearDown();
$this->Noticias->removeBehavior("CakePtbr.AjusteData");
unset($this->Noticias, $this->Noticias);
TableRegistry::clear();
}
示例2: testRemoveBehavior
/**
* Test removing a behavior from a table.
*
* @return void
*/
public function testRemoveBehavior()
{
$mock = $this->getMock('Cake\\ORM\\BehaviorRegistry', [], [], '', false);
$mock->expects($this->once())->method('unload')->with('Sluggable');
$table = new Table(['table' => 'articles', 'behaviors' => $mock]);
$table->removeBehavior('Sluggable');
}
示例3: testRemoveBehavior
/**
* Test removing a behavior from a table.
*
* @return void
*/
public function testRemoveBehavior()
{
$mock = $this->getMockBuilder('Cake\\ORM\\BehaviorRegistry')->disableOriginalConstructor()->getMock();
$mock->expects($this->once())->method('unload')->with('Sluggable');
$table = new Table(['table' => 'articles', 'behaviors' => $mock]);
$table->removeBehavior('Sluggable');
}