本文整理匯總了PHP中record_adapter::delete方法的典型用法代碼示例。如果您正苦於以下問題:PHP record_adapter::delete方法的具體用法?PHP record_adapter::delete怎麽用?PHP record_adapter::delete使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類record_adapter
的用法示例。
在下文中一共展示了record_adapter::delete方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: testChangeType
/**
* @covers Alchemy\Phrasea\Controller\Prod\Property::changeType
*/
public function testChangeType()
{
$file = new File(self::$DI['app'], self::$DI['app']['mediavorus']->guess(__DIR__ . '/../../../../../files/cestlafete.jpg'), self::$DI['collection']);
$record = \record_adapter::createFromFile($file, self::$DI['app']);
$record2 = \record_adapter::createFromFile($file, self::$DI['app']);
self::$DI['client']->request('POST', '/prod/records/property/type/', ['lst' => implode(';', [$record->get_serialize_key(), $record2->get_serialize_key()]), 'types' => [$record->get_serialize_key() => 'document', $record2->get_serialize_key() => 'flash']]);
$response = self::$DI['client']->getResponse();
$datas = (array) json_decode($response->getContent());
$this->assertArrayHasKey('success', $datas);
$this->assertTrue($datas['success']);
$this->assertArrayHasKey('updated', $datas);
$record = new \record_adapter(self::$DI['app'], $record->get_sbas_id(), $record->get_record_id());
$record2 = new \record_adapter(self::$DI['app'], $record2->get_sbas_id(), $record2->get_record_id());
$this->assertEquals('document', $record->get_type());
$this->assertEquals('flash', $record2->get_type());
$record->delete();
$record2->delete();
unset($response, $datas, $record2, $record, $file);
}