Changeset View
Changeset View
Standalone View
Standalone View
src/applications/files/storage/__tests__/PhabricatorFileTestCase.php
Show First 20 Lines • Show All 94 Lines • ▼ Show 20 Lines | public function testFileIndirectScramble() { | ||||
$xactions = array(); | $xactions = array(); | ||||
$xactions[] = id(new ManiphestTransaction()) | $xactions[] = id(new ManiphestTransaction()) | ||||
->setTransactionType(ManiphestTaskTitleTransaction::TRANSACTIONTYPE) | ->setTransactionType(ManiphestTaskTitleTransaction::TRANSACTIONTYPE) | ||||
->setNewValue(pht('File Scramble Test Task')); | ->setNewValue(pht('File Scramble Test Task')); | ||||
$xactions[] = id(new ManiphestTransaction()) | $xactions[] = id(new ManiphestTransaction()) | ||||
->setTransactionType( | ->setTransactionType( | ||||
ManiphestTaskDescriptionTransaction::TRANSACTIONTYPE) | ManiphestTaskDescriptionTransaction::TRANSACTIONTYPE) | ||||
->setNewValue('{'.$file->getMonogram().'}'); | ->setNewValue('{'.$file->getMonogram().'}') | ||||
->setMetadataValue( | |||||
'attachedFilePHIDs', | |||||
array( | |||||
$file->getPHID(), | |||||
)); | |||||
id(new ManiphestTransactionEditor()) | id(new ManiphestTransactionEditor()) | ||||
->setActor($author) | ->setActor($author) | ||||
->setContentSource($this->newContentSource()) | ->setContentSource($this->newContentSource()) | ||||
->applyTransactions($task, $xactions); | ->applyTransactions($task, $xactions); | ||||
$file = $file->reload(); | $file = $file->reload(); | ||||
$secret2 = $file->getSecretKey(); | $secret2 = $file->getSecretKey(); | ||||
▲ Show 20 Lines • Show All 373 Lines • Show Last 20 Lines |