Development

Changeset 6521

You must first sign up to be able to contribute.

Changeset 6521

Show
Ignore:
Timestamp:
12/16/07 11:15:24 (9 months ago)
Author:
fabien
Message:

added propel:insert-sql test in CLI tests

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/test/other/tasksTest.php

    r6502 r6521  
    5858} 
    5959 
    60 $t = new lime_test(33, new lime_output_color()); 
     60$t = new lime_test(35, new lime_output_color()); 
    6161$c = new symfony_cmd(); 
    6262$c->initialize($t); 
     
    7474$t->ok(is_dir($c->tmp_dir.DS.'apps'.DS.'frontend'.DS.'modules'.DS.'foo'), '"generate:module" creates a "foo" directory under "modules" directory'); 
    7575 
     76copy(dirname(__FILE__).'/fixtures/propel/schema.yml', $c->tmp_dir.DS.'config'.DS.'schema.yml'); 
     77copy(dirname(__FILE__).'/fixtures/propel/databases.yml', $c->tmp_dir.DS.'config'.DS.'databases.yml'); 
     78copy(dirname(__FILE__).'/fixtures/propel/propel.ini', $c->tmp_dir.DS.'config'.DS.'propel.ini'); 
     79 
    7680// propel:* 
    77 copy(dirname(__FILE__).'/fixtures/propel/schema.yml', $c->tmp_dir.DS.'config'.DS.'schema.yml'); 
    78  
    7981$content = $c->execute_command('propel:build-sql'); 
    8082$t->ok(file_exists($c->tmp_dir.DS.'data'.DS.'sql'.DS.'lib.model.schema.sql'), '"propel:build-sql" creates a "schema.sql" file under "data/sql" directory'); 
     
    8284$content = $c->execute_command('propel:build-model'); 
    8385$t->ok(file_exists($c->tmp_dir.DS.'lib'.DS.'model'.DS.'Article.php'), '"propel:build-model" creates model classes under "lib/model" directory'); 
     86 
     87$c->execute_command('propel:insert-sql'); 
     88$file = dirname(__FILE__).DS.'..'.DS.'..'.DS.'lib'.DS.'plugins'.DS.'sfPropelPlugin'.DS.'lib'.DS.'vendor'.DS.'propel-generator'.DS.'database.sqlite'; 
     89$t->ok(file_exists($file), '"propel:insert-sql" creates tables in the database'); 
     90rename($file, $c->tmp_dir.'/data/database.sqlite'); 
    8491 
    8592$content = $c->execute_command('propel:init-crud frontend articleInitCrud Article');