Merge pull request #30 from kohana/3.3/bug/travis-composer-no-interaction
[kohana-image.git] / tests / kohana / ImageTest.php
blob967b764377e9a5323800832a51c425d467f5375b
1 <?php defined('SYSPATH') OR die('Kohana bootstrap needs to be included before tests run');
3 /**
4 * @package Kohana/Image
5 * @group kohana
6 * @group kohana.image
7 * @category Test
8 * @author Kohana Team
9 * @copyright (c) 2009-2012 Kohana Team
10 * @license http://http://kohanaframework.org/license
13 class Kohana_ImageTest extends PHPUnit_Framework_TestCase {
15 protected function setUp()
17 if ( ! extension_loaded('gd'))
19 $this->markTestSkipped('The GD extension is not available.');
23 /**
24 * Tests the Image::save() method for files that don't have extensions
26 * @return void
28 public function test_save_without_extension()
30 $image = Image::factory(MODPATH.'image/tests/test_data/test_image');
31 $this->assertTrue($image->save(Kohana::$cache_dir.'/test_image'));
33 unlink(Kohana::$cache_dir.'/test_image');
36 } // End Kohana_ImageTest