You are here

function OembedTestHelper::assertFileEntityAccess in oEmbed 7

Same name and namespace in other branches
  1. 8 oembed.test \OembedTestHelper::assertFileEntityAccess()
  2. 7.0 oembed.test \OembedTestHelper::assertFileEntityAccess()

Asserts file_entity_access correctly grants or denies access.

1 call to OembedTestHelper::assertFileEntityAccess()
OembedProviderTestCase::testOembedProviders in modules/oembedprovider/oembedprovider.test

File

./oembed.test, line 98
Tests for oembed.module.

Class

OembedTestHelper
@file Tests for oembed.module.

Code

function assertFileEntityAccess($ops, $file, $account) {
  foreach ($ops as $op => $result) {
    $msg = t("file_entity_access returns @result with operation '@op'.", array(
      '@result' => $result ? 'true' : 'false',
      '@op' => $op,
    ));
    $this
      ->assertEqual($result, file_entity_access($op, $file, $account), $msg);
  }
}