本文整理汇总了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);
}