You are here

public function MediaFlickrUtils::testGuessSize in Media: Flickr 7.2

Test _media_flickr_guess_size().

File

tests/MediaFlickrUtils.test, line 39
Test Media Flickr unit tests.

Class

MediaFlickrUtils
Test Media Flickr utils unit tests.

Code

public function testGuessSize() {
  $this
    ->assertNull(_media_flickr_guess_size(), 'Correctly returned null.');
  $this
    ->assertIdentical(_media_flickr_guess_size(), 0, 'Correctly returned 0.');
  $this
    ->assertEqual(_media_flickr_guess_size(400), 3, 'Only width used.');
  $this
    ->assertEqual(_media_flickr_guess_size(NULL, 400), 3, 'Only height used.');
  $this
    ->assertEqual(_media_flickr_guess_size(800, 400), 4, 'Correctly picked largest.');
}