Subversion-Projekte lars-tiefland.php_share

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
<?php
2
 
3
/*
4
 * This file is part of the symfony package.
5
 * (c) 2004-2006 Fabien Potencier <fabien.potencier@symfony-project.com>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
 
11
require_once(dirname(__FILE__).'/crudBrowser.class.php');
12
 
13
class RestBrowser extends CrudBrowser
14
{
15
  protected
16
    $urlPrefix = 'articles';
17
 
18
  public function setup($options)
19
  {
20
    $this->projectDir = dirname(__FILE__).'/../fixtures';
21
    $this->cleanup();
22
 
23
    chdir($this->projectDir);
24
    $task = new sfPropelGenerateModuleForRouteTask(new sfEventDispatcher(), new sfFormatter());
25
    $options[] = 'env=test';
26
    $options[] = '--non-verbose-templates';
27
    $task->run(array('crud', 'articles'), $options);
28
 
29
    require_once($this->projectDir.'/config/ProjectConfiguration.class.php');
30
    sfContext::createInstance(ProjectConfiguration::getApplicationConfiguration('crud', 'test', true, $this->projectDir));
31
 
32
    $options['with-show'] = true;
33
 
34
    return $options;
35
  }
36
}