403Webshell
Server IP : 195.130.67.5  /  Your IP : 216.73.217.154
Web Server : Microsoft-IIS/10.0
System : Windows NT WEBSERVER1 10.0 build 17763 (Windows Server 2016) i586
User : IUSR ( 0)
PHP Version : 7.4.19
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/inetpub/wwwroot/business/sites/all/modules/ctools/tests/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/inetpub/wwwroot/business/sites/all/modules/ctools/tests//object_cache.test
<?php

/**
 * Test object cache storage.
 */
class CtoolsObjectCache extends DrupalWebTestCase {

  /**
   * {@inheritdoc}
   */
  public static function getInfo() {
    return array(
      'name' => 'Object cache storage (UI tests)',
      'description' => 'Verify that objects are written, readable and lockable.',
      'group' => 'ctools',
      'dependencies' => array('ctools'),
    );
  }

  /**
   * {@inheritdoc}
   */
  public function setUp(array $modules = array()) {
    $modules[] = 'ctools';
    parent::setUp($modules);
  }


  public function testObjectStorage() {
    ctools_include('cache');

    $account1 = $this->drupalCreateUser(array());
    $this->drupalLogin($account1);

    $data = array(
      'test1' => 'foobar',
    );

    ctools_include('object-cache');
    ctools_object_cache_set('testdata', 'one', $data);
    $this->assertEqual($data, ctools_object_cache_get('testdata', 'one'), 'Object cache data successfully stored');

    // TODO Test object locking somehow.
    // Object locking/testing works on session_id but simpletest uses
    // $this->session_id so can't be tested ATM.
    ctools_object_cache_clear('testdata', 'one');
    $this->assertFalse(ctools_object_cache_get('testdata', 'one'), 'Object cache data successfully cleared');

    // TODO Test ctools_object_cache_clear_all somehow...
    // ctools_object_cache_clear_all requires session_id funtionality as well.
  }

}

Youez - 2016 - github.com/yon3zu
LinuXploit