BaseImageFilterTest.php 639B

12345678910111213141516171819202122232425
  1. <?php
  2. /*
  3. * This file is part of the Assetic package, an OpenSky project.
  4. *
  5. * (c) 2010-2012 OpenSky Project Inc
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Assetic\Test\Filter;
  11. abstract class BaseImageFilterTest extends \PHPUnit_Framework_TestCase
  12. {
  13. public static function assertMimeType($expected, $data, $message = null)
  14. {
  15. $finfo = new \finfo(FILEINFO_MIME_TYPE);
  16. $actual = file_exists($data) ? $finfo->file($data) : $finfo->buffer($data);
  17. self::assertEquals($expected, $actual, $message);
  18. }
  19. }