/[drupal]/contributions/modules/transformer/transformer.test
ViewVC logotype

Contents of /contributions/modules/transformer/transformer.test

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (show annotations) (download) (as text)
Fri Mar 30 09:14:36 2007 UTC (2 years, 7 months ago) by dopry
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -2 lines
File MIME type: text/x-php
Big reorg. split ui/transform code. Moved transforms to a module hook instead of
conditional loading interface. cleaned up cruft. Probably thoroughly broken. :)
1 <?php
2
3 // $Id
4 /**
5 * @file
6 */
7
8 class tranformer_test extends DrupalTestCase {
9 function get_info() {
10 return array(
11 'name' => t('tranformer tests'),
12 'desc' => t('Exercises the Tranformer module'),
13 'group' => 'Transformer Tests'
14 );
15 }
16
17 function testTransformerScale() {
18 $this->drupalModuleEnable('transformer');
19 $src = drupal_get_path('module', 'transfomer') .'/transformer.test.jpg';
20 $dst = file_create_path('transformer.test.output.jpg');
21
22 //create a macro
23 $macro = array();
24 // Add a Scale to 20x20 macro.
25
26 $result = transformer_macro_perform($macro);
27 $info = image_get_info($dst);
28 $this->AssertTrue(($info['width'] == 120 && $info['height'] == 20, 'Image Scaled Properly');
29 unlink($dst);
30 }
31 }
32

  ViewVC Help
Powered by ViewVC 1.1.2