Reenable Twitter/Media Post tests
This commit is contained in:
		
					parent
					
						
							
								f84c696925
							
						
					
				
			
			
				commit
				
					
						204b8b6e49
					
				
			
		
					 5 changed files with 135 additions and 117 deletions
				
			
		| 
						 | 
				
			
			@ -835,97 +835,6 @@ class ApiTest extends FixtureTest
 | 
			
		|||
		// api_statuses_mediap('json');
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Test the api_statuses_update() function.
 | 
			
		||||
	 *
 | 
			
		||||
	 * @return void
 | 
			
		||||
	 */
 | 
			
		||||
	public function testApiStatusesUpdate()
 | 
			
		||||
	{
 | 
			
		||||
		/*
 | 
			
		||||
		$_REQUEST['status']                = 'Status content #friendica';
 | 
			
		||||
		$_REQUEST['in_reply_to_status_id'] = -1;
 | 
			
		||||
		$_REQUEST['lat']                   = 48;
 | 
			
		||||
		$_REQUEST['long']                  = 7;
 | 
			
		||||
		$_FILES                            = [
 | 
			
		||||
			'media' => [
 | 
			
		||||
				'id'       => 666,
 | 
			
		||||
				'size'     => 666,
 | 
			
		||||
				'width'    => 666,
 | 
			
		||||
				'height'   => 666,
 | 
			
		||||
				'tmp_name' => $this->getTempImage(),
 | 
			
		||||
				'name'     => 'spacer.png',
 | 
			
		||||
				'type'     => 'image/png'
 | 
			
		||||
			]
 | 
			
		||||
		];
 | 
			
		||||
 | 
			
		||||
		$result = api_statuses_update('json');
 | 
			
		||||
		self::assertStatus($result['status']);
 | 
			
		||||
		*/
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Test the api_statuses_update() function with an HTML status.
 | 
			
		||||
	 *
 | 
			
		||||
	 * @return void
 | 
			
		||||
	 */
 | 
			
		||||
	public function testApiStatusesUpdateWithHtml()
 | 
			
		||||
	{
 | 
			
		||||
		/*
 | 
			
		||||
		$_REQUEST['htmlstatus'] = '<b>Status content</b>';
 | 
			
		||||
 | 
			
		||||
		$result = api_statuses_update('json');
 | 
			
		||||
		self::assertStatus($result['status']);
 | 
			
		||||
		*/
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Test the api_statuses_update() function without an authenticated user.
 | 
			
		||||
	 *
 | 
			
		||||
	 * @return void
 | 
			
		||||
	 */
 | 
			
		||||
	public function testApiStatusesUpdateWithoutAuthenticatedUser()
 | 
			
		||||
	{
 | 
			
		||||
		/*
 | 
			
		||||
		$this->expectException(\Friendica\Network\HTTPException\UnauthorizedException::class);
 | 
			
		||||
		BasicAuth::setCurrentUserID();
 | 
			
		||||
		$_SESSION['authenticated'] = false;
 | 
			
		||||
		api_statuses_update('json');
 | 
			
		||||
		*/
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Test the api_statuses_update() function with a parent status.
 | 
			
		||||
	 *
 | 
			
		||||
	 * @return void
 | 
			
		||||
	 */
 | 
			
		||||
	public function testApiStatusesUpdateWithParent()
 | 
			
		||||
	{
 | 
			
		||||
		$this->markTestIncomplete('This triggers an exit() somewhere and kills PHPUnit.');
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Test the api_statuses_update() function with a media_ids parameter.
 | 
			
		||||
	 *
 | 
			
		||||
	 * @return void
 | 
			
		||||
	 */
 | 
			
		||||
	public function testApiStatusesUpdateWithMediaIds()
 | 
			
		||||
	{
 | 
			
		||||
		$this->markTestIncomplete();
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Test the api_statuses_update() function with the throttle limit reached.
 | 
			
		||||
	 *
 | 
			
		||||
	 * @return void
 | 
			
		||||
	 */
 | 
			
		||||
	public function testApiStatusesUpdateWithDayThrottleReached()
 | 
			
		||||
	{
 | 
			
		||||
		$this->markTestIncomplete();
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
	/**
 | 
			
		||||
	 * Test the api_statuses_repeat() function.
 | 
			
		||||
	 *
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue