コード例 #1
0
 function setUp()
 {
     $this->acl_toolkit = new MockSimpleACLBaseToolkit($this);
     $this->authorizer = new MockSimpleACLAuthorizer($this);
     $this->acl_toolkit->setReturnReference('getAuthorizer', $this->authorizer);
     Limb::registerToolkit($this->acl_toolkit, 'SimpleACL');
     Limb::saveToolkit();
 }
コード例 #2
0
 function setUp()
 {
     $toolkit =& Limb::toolkit();
     $conn =& $toolkit->getDBConnection();
     $this->db =& new SimpleDB($conn);
     $this->_cleanUp();
     $toolkit =& Limb::saveToolkit();
     $toolkit->setRequestResolver('tree_based_entity', new TreeBasedEntityRequestResolver());
 }
コード例 #3
0
  function setUp()
  {
    $view = new Component();
    $this->form_component = new MockFormComponent($this);
    $view->addChild($this->form_component, $this->form_id);

    $toolkit =& Limb :: saveToolkit();
    $toolkit->setView($view);
  }
コード例 #4
0
  function setUp()
  {
    $template = "<form id='test_form' runat='server'></form>";
    registerTestingTemplate('FormProcessingCommandTest.html', $template);

    $toolkit =& Limb :: saveToolkit();

    $template = new Template('FormProcessingCommandTest.html');
    $toolkit->setView($template);
  }
  function setUp()
  {
    $toolkit =& Limb :: saveToolkit();

    $this->action_resolver = new MockRequestResolver($this);
    $this->service_resolver = new MockRequestResolver($this);
    $this->service = new MockService($this);

    $toolkit->setRequestResolver('action', $this->action_resolver);
    $toolkit->setRequestResolver('service', $this->service_resolver);

    $this->fc = new MockFilterChain($this);
  }
コード例 #6
0
 function setUp()
 {
     $toolkit =& Limb::toolkit();
     $conn =& $toolkit->getDBConnection();
     $this->db =& new SimpleDB($conn);
     $this->_cleanUp();
     $form_template_path = '/test_content_service_node_form.html';
     $form_name = 'test_form';
     RegisterTestingTemplate($form_template_path, '<form id="' . $form_name . '" runat="server"></form>');
     $validator = new LimbHandle(LIMB_SERVICE_NODE_DIR . '/validators/CommonEditServiceNodeValidator');
     $this->command = new EditServiceNodeCommand($form_template_path, $form_name, $validator);
     $toolkit =& Limb::saveToolkit();
     $toolkit->setRequestResolver('tree_based_entity', new TreeBasedEntityRequestResolver());
 }
 function setUp()
 {
     $toolkit =& Limb::toolkit();
     $conn =& $toolkit->getDBConnection();
     $this->db =& new SimpleDB($conn);
     $this->_cleanUp();
     $template_path = '/test_content_service_node_form.html';
     $form_id = 'test_form';
     $validator = new EditTestContentServiceNodeValidator();
     RegisterTestingTemplate($template_path, '<form id="' . $form_id . '" runat="server"></form>');
     // dataspace field => content part field
     $content_map = array('annotation' => 'annotation', 'content' => 'content');
     $this->command = new EditContentServiceNodeCommand($template_path, $form_id, $validator, $content_map);
     $toolkit =& Limb::saveToolkit();
     $toolkit->setRequestResolver('tree_based_entity', new TreeBasedEntityRequestResolver());
 }
コード例 #8
0
  function testSaveToolkit()
  {
    $toolkit = new ImagineryToolkit();

    Limb :: registerToolkit($toolkit, 'test');

    $toolkit2 =& Limb :: saveToolkit('test');
    $this->assertTrue($toolkit2->reseted);

    $toolkit2->foo();

    //restoring saved toolkit
    Limb :: restoreToolkit('test');

    //should be a reference to $toolkit
    $toolkit3 =& Limb :: toolkit('test');
    $toolkit3->bar();

    $this->assertFalse($toolkit->foo_called);
    $this->assertTrue($toolkit->bar_called);

    Limb :: restoreToolkit('test');
  }
コード例 #9
0
 function setUp()
 {
   Limb :: saveToolkit();
 }
コード例 #10
0
 function setUp()
 {
   $this->toolkit =& Limb :: saveToolkit();
   $this->fc = new MockFilterChain($this);
 }
コード例 #11
0
 function setUp()
 {
   $this->toolkit =& Limb :: saveToolkit();
 }
コード例 #12
0
 function setUp()
 {
   Limb :: saveToolkit();
   $this->component = new LimbPagerComponent();
 }
コード例 #13
0
 function setUp()
 {
     $this->cmd = new SimpleACLLoginCommand();
     Limb::saveToolkit();
 }