protected function UpgradePathTest::assertUpgradeComplete in Video Embed Field 8
Assert the upgrade was successful.
1 call to UpgradePathTest::assertUpgradeComplete()
- UpgradePathTest::testMediaBundleCreation in modules/
video_embed_media/ tests/ src/ Functional/ UpgradePathTest.php  - Test the upgrade path.
 
File
- modules/
video_embed_media/ tests/ src/ Functional/ UpgradePathTest.php, line 87  
Class
- UpgradePathTest
 - Test the upgrade path from media_entity_embedded_video.
 
Namespace
Drupal\Tests\video_embed_media\FunctionalCode
protected function assertUpgradeComplete() {
  // Ensure the new type is selected.
  $this
    ->drupalGet('admin/structure/media/manage/embeddable_bundle');
  $this
    ->assertTrue(!empty($this
    ->getSession()
    ->getPage()
    ->find('xpath', '//option[@value="video_embed_field" and @selected="selected"]')), 'The media type was updated.');
  // Ensure the media entity has updated values.
  $this
    ->drupalGet('media/1/edit');
  $this
    ->assertEquals($this
    ->getSession()
    ->getPage()
    ->find('css', 'input[name="field_video_text_field[0][value]"]')
    ->getValue(), 'https://www.youtube.com/watch?v=gnERPdAiuSo', 'Field values were copied.');
}