InformationDumperTest.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?php
  2. /**
  3. * This file is part of the PHPExiftool package.
  4. *
  5. * (c) Alchemy <support@alchemy.fr>
  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 PHPExiftool\Test;
  11. use Monolog\Logger;
  12. use Monolog\Handler\NullHandler;
  13. use PHPExiftool\InformationDumper;
  14. use PHPExiftool\Exiftool;
  15. class InformationDumperTest extends \PHPUnit_Framework_TestCase
  16. {
  17. /**
  18. * @var InformationDumper
  19. */
  20. protected $object;
  21. protected function setUp()
  22. {
  23. $logger = new Logger('Tests');
  24. $logger->pushHandler(new NullHandler());
  25. $this->object = new InformationDumper(new Exiftool($logger));
  26. }
  27. /**
  28. * @covers PHPExiftool\InformationDumper::listDatas
  29. */
  30. public function testListDatas()
  31. {
  32. $this->object->listDatas();
  33. }
  34. /**
  35. * @covers PHPExiftool\InformationDumper::listDatas
  36. * @covers \PHPExiftool\Exception\InvalidArgumentException
  37. * @expectedException \PHPExiftool\Exception\InvalidArgumentException
  38. */
  39. public function testListDatasInvalidType()
  40. {
  41. $this->object->listDatas('Scrooge');
  42. }
  43. }