1
0
mirror of https://github.com/Intervention/image.git synced 2025-01-17 20:28:21 +01:00
intervention_image/tests/ImageManagerStaticTest.php
2014-08-06 20:37:17 +02:00

36 lines
1.0 KiB
PHP

<?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);
}
}