You are here

public function AcquiadamServiceTest::testSelfGetFolderData in Media: Acquia DAM 8

Validate our helper method for testing folder data works as expected.

File

tests/src/Unit/AcquiadamServiceTest.php, line 121

Class

AcquiadamServiceTest
Acquia DAM REST extension tests.

Namespace

Drupal\Tests\media_acquiadam\Unit

Code

public function testSelfGetFolderData() {

  // Test that we can get parent folders.
  $folder = $this
    ->getFolderData(90786);
  $this
    ->assertObjectHasAttribute('id', $folder);
  $this
    ->assertEquals(90786, $folder->id);

  // Test that we can get child folders.
  $folder = $this
    ->getFolderData(90788);
  $this
    ->assertObjectHasAttribute('id', $folder);
  $this
    ->assertEquals(90788, $folder->id);
}