You are here

function FlickrApiTestCase::testPhpFlickrClass in Flickr API 7

Same name and namespace in other branches
  1. 6 tests/flickrapi.test \FlickrApiTestCase::testPhpFlickrClass()
  2. 7.2 tests/flickrapi.test \FlickrApiTestCase::testPhpFlickrClass()

File

tests/flickrapi.test, line 30
Unit Tests for flickrapi module http://drupal.org/node/265762

Class

FlickrApiTestCase
@file Unit Tests for flickrapi module http://drupal.org/node/265762

Code

function testPhpFlickrClass() {
  if ($flickr = flickrapi_phpFlickr()) {
    $this
      ->assertTrue($flickr);
    $pandas = $flickr
      ->panda_getList();
    $this
      ->assertTrue(is_array($pandas));
    foreach ($pandas['panda'] as $name) {
      $photos = $flickr
        ->panda_getPhotos($name);
      $this
        ->assertTrue(is_array($photos['photo']));
    }
  }
}