Advertisement
Serafim

Untitled

Dec 17th, 2014
295
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.00 KB | None | 0 0
  1. <?hh
  2. // Copyright 2004-present Facebook. All Rights Reserved.
  3.  
  4. /**
  5.  * @emails oncall+ads_manager_reporting
  6.  */
  7. class EditImagesActivityLoaderTest
  8.   extends ActivityLoaderTestBase {
  9.  
  10.   public function beforeEach(): void {
  11.     Classes::get('AdproAccountImageUrlUtils')
  12.       ->mockYield('genImageURLsFromHashes', 'http://yeah.woo');
  13.     $this->eventType = 'edit_images';
  14.     $this->extraData = array(
  15.       'txn_params' => array(
  16.         'account_id' => 57665093,
  17.         'specs' => array(
  18.           'hash' => 'eb0198bf8929ff3434583248c05c220f',
  19.           'status' => 1,
  20.         ),
  21.       )
  22.     );
  23.     parent::beforeEach();
  24.   }
  25.  
  26.   public async function testImageEdit(): Awaitable<void> {
  27.     $log = await EditImagesActivityLoader::gen(
  28.       $this->viewerContext,
  29.       $this->extraData,
  30.       $this->headers,
  31.     );
  32.     expect(
  33.       $log->getExtraData(),
  34.     )->toEqual(
  35.       Map {
  36.         ActivityExtraDataFields::IMAGE_URL => Vector {
  37.           '',
  38.         },
  39.       },
  40.     );
  41.   }
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement