-
Notifications
You must be signed in to change notification settings - Fork 378
/
BinaryTest.php
35 lines (26 loc) · 965 Bytes
/
BinaryTest.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php
namespace Liip\ImagineBundle\Tests\Model;
use Liip\ImagineBundle\Model\Binary;
class BinaryTest extends \PHPUnit_Framework_TestCase
{
public function testImplementsBinaryInterface()
{
$rc = new \ReflectionClass('Liip\ImagineBundle\Model\Binary');
$this->assertTrue($rc->implementsInterface('Liip\ImagineBundle\Binary\BinaryInterface'));
}
public function testAllowGetContentSetInConstructor()
{
$image = new Binary('theContent', 'image/png', 'png');
$this->assertEquals('theContent', $image->getContent());
}
public function testAllowGetMimeTypeSetInConstructor()
{
$image = new Binary('aContent', 'image/png', 'png');
$this->assertEquals('image/png', $image->getMimeType());
}
public function testAllowGetFormatSetInConstructor()
{
$image = new Binary('aContent', 'image/png', 'png');
$this->assertEquals('png', $image->getFormat());
}
}