You are here

function RemoteStreamWrapperTestCase::testFileStat in Remote Stream Wrapper 7

Same name and namespace in other branches
  1. 8 remote_stream_wrapper.test \RemoteStreamWrapperTestCase::testFileStat()

Check that basic-level file functions return expected values.

File

./remote_stream_wrapper.test, line 62

Class

RemoteStreamWrapperTestCase
Tests for the remote_stream_wrapper module.

Code

function testFileStat() {
  $files = $this
    ->drupalGetTestFiles('image');
  $file = $files[0];
  $this
    ->assertTrue(is_file($file->uri));
  $this
    ->assertFalse(is_dir($file->uri));
  $this
    ->assertEqual(filesize($file->uri), 125);
  $this
    ->assertEqual(image_get_info($file->uri), array(
    'width' => 40,
    'height' => 20,
    'extension' => 'png',
    'mime_type' => 'image/png',
    'file_size' => 125,
  ));
}