You are here

ImceFileTest.php in IMCE 8

Same filename and directory in other branches
  1. 8.2 tests/src/Unit/ImceFileTest.php

File

tests/src/Unit/ImceFileTest.php
View source
<?php

namespace Drupal\Tests\imce\Unit;

use Drupal\imce\ImceFile;
use Drupal\Tests\UnitTestCase;

/**
 * Test ImceFile.
 *
 * @group imce
 */
class ImceFileTest extends UnitTestCase {

  /**
   * Imce File.
   *
   * @var \Drupal\imce\ImceFile
   */
  protected $imceFile;

  /**
   * {@inheritdoc}
   */
  public function setUp() {
    parent::setUp();
    $this->imceFile = $this
      ->createMock(ImceFile::class);
  }

  /**
   * Test type.
   */
  public function testType() {
    $this
      ->assertNotEmpty($this->imceFile->type);
    $this
      ->assertTrue(is_string($this->imceFile->type));
    $this
      ->assertEquals('file', $this->imceFile->type);
  }

}

Classes

Namesort descending Description
ImceFileTest Test ImceFile.