Development

Changeset 6859

You must first sign up to be able to contribute.

Changeset 6859

Show
Ignore:
Timestamp:
12/31/07 17:14:16 (1 year ago)
Author:
fabien
Message:

fixed cache:clear unit tests

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/1.1/test/bin/prove.php

    r5319 r6859  
    3838// unit tests 
    3939$h->register_glob($h->base_dir.'/unit/*/*Test.php'); 
     40$h->register_glob($h->base_dir.'/unit/*/*/*Test.php'); 
    4041$h->register_glob($h->base_dir.'/../lib/plugins/*/test/unit/*Test.php'); 
    4142$h->register_glob($h->base_dir.'/../lib/plugins/*/test/unit/*/*Test.php'); 
  • branches/1.1/test/bootstrap/task.php

    r4743 r6859  
    1414require_once(sfConfig::get('sf_symfony_lib_dir').'/command/sfSymfonyCommandApplication.class.php'); 
    1515 
    16 class sfSymfonyCommandApplicationTest extends sfSymfonyCommandApplication 
    17 { 
    18   public function initialize($symfonyLibDir, $symfonyDataDir) 
    19   { 
    20     $this->initializeEnvironment(sfConfig::get('sf_symfony_lib_dir'), sfConfig::get('sf_symfony_data_dir')); 
    21   } 
    22 } 
    23  
    2416$tmpDir = sfToolkit::getTmpDir().DIRECTORY_SEPARATOR.'sf_'.rand(11111, 99999); 
    2517mkdir($tmpDir, 0777, true); 
    2618chdir($tmpDir); 
    2719 
    28 $application = new sfSymfonyCommandApplicationTest(); 
    29 $application->initialize(sfConfig::get('sf_symfony_lib_dir'), sfConfig::get('sf_symfony_data_dir')); 
     20$application = new sfSymfonyCommandApplication(new sfEventDispatcher(), new sfFormatter(), array( 
     21  'symfony_lib_dir' => sfConfig::get('sf_symfony_lib_dir'), 
     22  'symfony_data_dir' => sfConfig::get('sf_symfony_data_dir'), 
     23)); 
    3024 
    3125register_shutdown_function('sf_shutdown_task_test'); 
  • branches/1.1/test/unit/task/cache/sfCacheClearTaskTest.php

    r4957 r6859  
    1313$t = new lime_test(2, new lime_output_color()); 
    1414 
    15 $task = new sfGenerateProjectTask(); 
     15$dispatcher = new sfEventDispatcher(); 
     16$formatter = new sfFormatter(); 
     17 
     18$task = new sfGenerateProjectTask($dispatcher, $formatter); 
    1619$task->run(array('test')); 
    17 $task = new sfGenerateAppTask(); 
     20$task = new sfGenerateAppTask($dispatcher, $formatter); 
    1821$task->run(array('frontend')); 
    1922 
     
    2730$t->ok(file_exists($file), 'The test file is in the cache'); 
    2831 
    29 $task = new sfCacheClearTask(); 
     32$task = new sfCacheClearTask($dispatcher, $formatter); 
    3033$task->run(); 
    3134