forked from Intervention/image
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathImageManagerStaticTest.php
More file actions
35 lines (30 loc) · 1.02 KB
/
ImageManagerStaticTest.php
File metadata and controls
35 lines (30 loc) · 1.02 KB
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
use Intervention\Image\ImageManagerStatic;
class ImageManagerStaticTest extends PHPUnit_Framework_TestCase
{
public function tearDown()
{
Mockery::close();
}
public function testGetManager()
{
$manager = Mockery::mock('Intervention\Image\ImageManager');
$managerStatic = new ImageManagerStatic($manager);
$m = $managerStatic->getManager();
$this->assertInstanceOf('Intervention\Image\ImageManager', $m);
}
public function testMake()
{
$manager = Mockery::mock('Intervention\Image\ImageManager');
$manager->shouldReceive('make')->with('foo')->once();
$managerStatic = new ImageManagerStatic($manager);
$managerStatic->make('foo');
}
public function testCanvas()
{
$manager = Mockery::mock('Intervention\Image\ImageManager');
$manager->shouldReceive('canvas')->with(100, 100, null)->once();
$managerStatic = new ImageManagerStatic($manager);
$managerStatic->canvas(100, 100);
}
}