mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-23 09:53:15 +00:00
generate pdf subdef
This commit is contained in:
51
tests/Alchemy/Tests/Phrasea/Media/Subdef/PdfTest.php
Normal file
51
tests/Alchemy/Tests/Phrasea/Media/Subdef/PdfTest.php
Normal file
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
|
||||
namespace Alchemy\Tests\Phrasea\Media\Subdef;
|
||||
|
||||
use Alchemy\Phrasea\Media\Subdef\Pdf;
|
||||
use Alchemy\Phrasea\Media\Subdef\Subdef;
|
||||
use Alchemy\Tests\Tools\TranslatorMockTrait;
|
||||
|
||||
/**
|
||||
* @group functional
|
||||
* @group legacy
|
||||
*/
|
||||
class PdfTest extends \PhraseanetTestCase
|
||||
{
|
||||
use TranslatorMockTrait;
|
||||
|
||||
/**
|
||||
* @var Pdf
|
||||
*/
|
||||
protected $object;
|
||||
|
||||
public function setUp()
|
||||
{
|
||||
parent::setUp();
|
||||
$this->object = new Pdf($this->createTranslatorMock());
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Alchemy\Phrasea\Media\Subdef\Pdf::getType
|
||||
*/
|
||||
public function testGetType()
|
||||
{
|
||||
$this->assertEquals(Subdef::TYPE_PDF, $this->object->getType());
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Alchemy\Phrasea\Media\Subdef\Pdf::getDescription
|
||||
*/
|
||||
public function testGetDescription()
|
||||
{
|
||||
$this->assertTrue(is_string($this->object->getDescription()));
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Alchemy\Phrasea\Media\Subdef\Pdf::getMediaAlchemystSpec
|
||||
*/
|
||||
public function testGetMediaAlchemystSpec()
|
||||
{
|
||||
$this->assertInstanceOf('Alchemy\\Phrasea\\Media\\Subdef\\Specification\\PdfSpecification', $this->object->getMediaAlchemystSpec());
|
||||
}
|
||||
}
|
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
namespace Alchemy\Tests\Phrasea\Media\Subdef\Specification;
|
||||
|
||||
use Alchemy\Phrasea\Media\Subdef\Specification\PdfSpecification;
|
||||
|
||||
class PdfTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @covers Alchemy\Phrasea\Media\Subdef\Specification\PdfSpecification::getType
|
||||
*/
|
||||
public function testGetType()
|
||||
{
|
||||
$specs = new PdfSpecification();
|
||||
$this->assertEquals(PdfSpecification::TYPE_PDF, $specs->getType());
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user