Skip to content

Instantly share code, notes, and snippets.

@cmcramer
Last active October 6, 2015 15:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cmcramer/b869e809096fe6a36612 to your computer and use it in GitHub Desktop.
Save cmcramer/b869e809096fe6a36612 to your computer and use it in GitHub Desktop.
YouTubeEmbedFunctionalTest.php
-------
class YouTubeEmbedFunctionalTest extends FunctionalTest {
/**
* @var YouTubeEmbed
*/
private $youTubeEmbed;
/**
* @var String
*/
protected static $fixture_file = 'YouTubeEmbedTest.yml';
public function setUp() {
parent::setUp();
$this->youTubeEmbed = $this->objFromFixture('YouTubeEmbed', 'embed');
}
public function testYouTubeConnect() {
//$response = $this->get($this->youTubeEmbed->WatchOnYouTubeUrl());
$response = $this->get('/');
//$response = $this->get('/dev/');
//$response = Director::test('/dev/');
//Debug::show($this->mainSession->lastUrl());
//Debug::show($response);
$this->assertEquals(200, $response->getStatusCode());
}
}
YouTubeEmbed.yml
------
YouTubeEmbed:
embed:
Title: Webcam
YouTubeId: ibtdOuukpfc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment