-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
80 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<?php | ||
|
||
/** | ||
* WARNING: Running tests will post and delete through the actual Twitter account when updating or saving VCR cassettes. | ||
*/ | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Abraham\TwitterOAuth\Test; | ||
|
||
use PHPUnit\Framework\TestCase; | ||
use Abraham\TwitterOAuth\TwitterOAuth; | ||
|
||
class TwitterOAuthV2Test extends TestCase | ||
{ | ||
/** @var TwitterOAuth */ | ||
protected $twitter; | ||
|
||
protected function setUp(): void | ||
{ | ||
$this->markTestSkipped('Fixtures need to be updated'); | ||
$this->twitter = new TwitterOAuth( | ||
CONSUMER_KEY, | ||
CONSUMER_SECRET, | ||
ACCESS_TOKEN, | ||
ACCESS_TOKEN_SECRET, | ||
); | ||
$this->userId = explode('-', ACCESS_TOKEN)[0]; | ||
$this->twitter->setApiVersion('2'); | ||
} | ||
|
||
/** | ||
* @vcr testV2GetUsers.json | ||
*/ | ||
public function testV2GetUsers() | ||
{ | ||
$this->twitter->get('users', ['ids' => 12]); | ||
$this->assertEquals(200, $this->twitter->getLastHttpCode()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[] |