forked from Intervention/image
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGdContainerTest.php
More file actions
36 lines (31 loc) · 920 Bytes
/
GdContainerTest.php
File metadata and controls
36 lines (31 loc) · 920 Bytes
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
36
<?php
use Intervention\Image\Gd\Container;
class GdContainerTest extends PHPUnit_Framework_TestCase
{
public function tearDown()
{
Mockery::close();
}
public function testSetGetCore()
{
$container = new Container;
$container->setCore('foo');
$this->assertEquals('foo', $container->getCore());
}
public function testCountFrames()
{
$container = new Container;
$container->addFrames(array('foo', 'bar', 'baz'));
$this->assertEquals(3, $container->countFrames());
}
public function testIterateToFrames()
{
$frame = Mockery::mock('Intervention\Image\Frame');
$container = new Container;
$container->addFrame($frame);
$container->addFrame($frame);
foreach ($container as $key => $value) {
$this->assertInstanceOf('Intervention\Image\Frame', $value);
}
}
}