Linux polon 4.19.0-27-amd64 #1 SMP Debian 4.19.316-1 (2024-06-25) x86_64
Apache/2.4.59 (Debian)
: 10.2.73.233 | : 3.133.152.151
Cant Read [ /etc/named.conf ]
5.6.40-64+0~20230107.71+debian10~1.gbp673146
www-data
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
home /
baltic /
web /
modules /
views /
tests /
handlers /
[ HOME SHELL ]
Name
Size
Permission
Action
views_handler_area_text.test
1.75
KB
-rw-r--r--
views_handler_argument_null.te...
2.05
KB
-rw-r--r--
views_handler_argument_string....
3.46
KB
-rw-r--r--
views_handler_field.test
15.29
KB
-rw-r--r--
views_handler_field_boolean.te...
4.22
KB
-rw-r--r--
views_handler_field_counter.te...
1.94
KB
-rw-r--r--
views_handler_field_custom.tes...
1.12
KB
-rw-r--r--
views_handler_field_date.test
3.65
KB
-rw-r--r--
views_handler_field_file_exten...
2.04
KB
-rw-r--r--
views_handler_field_file_size....
1.89
KB
-rw-r--r--
views_handler_field_math.test
1.04
KB
-rw-r--r--
views_handler_field_url.test
1.43
KB
-rw-r--r--
views_handler_field_xss.test
1.27
KB
-rw-r--r--
views_handler_filter_combine.t...
2.3
KB
-rw-r--r--
views_handler_filter_date.test
8.21
KB
-rw-r--r--
views_handler_filter_equality....
4.16
KB
-rw-r--r--
views_handler_filter_in_operat...
4.69
KB
-rw-r--r--
views_handler_filter_numeric.t...
9.88
KB
-rw-r--r--
views_handler_filter_string.te...
21.97
KB
-rw-r--r--
views_handler_sort.test
3.27
KB
-rw-r--r--
views_handler_sort_date.test
5.84
KB
-rw-r--r--
views_handler_sort_random.test
2.56
KB
-rw-r--r--
views_handlers.test
1.77
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : views_handler_filter_date.test
<?php /** * @file * Definition of ViewsHandlerFilterDateTest. */ /** * Tests the core views_handler_filter_date handler. */ class ViewsHandlerFilterDateTest extends ViewsSqlTest { public static function getInfo() { return array( 'name' => 'Filter: Date', 'description' => 'Test the core views_handler_filter_date handler.', 'group' => 'Views Handlers', ); } function setUp() { parent::setUp(); // Add some basic test nodes. $this->nodes = array(); $this->nodes[] = $this->drupalCreateNode(array('created' => 100000)); $this->nodes[] = $this->drupalCreateNode(array('created' => 200000)); $this->nodes[] = $this->drupalCreateNode(array('created' => 300000)); $this->nodes[] = $this->drupalCreateNode(array('created' => time() + 86400)); $this->map = array( 'nid' => 'nid', ); $this->enableViewsUi(); } /** * Test the general offset functionality. */ function testOffset() { $view = $this->views_test_offset(); // Test offset for simple operator. $view->set_display('default'); $view->init_handlers(); $view->filter['created']->operator = '>'; $view->filter['created']->value['type'] = 'offset'; $view->filter['created']->value['value'] = '+1 hour'; $view->execute_display('default'); $expected_result = array( array('nid' => $this->nodes[3]->nid), ); $this->assertIdenticalResultset($view, $expected_result, $this->map); $view->destroy(); // Test "first day of" type of relative dates for simple operator. $view->set_display('default'); $view->init_handlers(); $view->filter['created']->operator = '<'; $view->filter['created']->value['type'] = 'offset'; $view->filter['created']->value['value'] = 'last day of January 1970'; $view->execute_display('default'); $expected_result = array( array('nid' => $this->nodes[0]->nid), array('nid' => $this->nodes[1]->nid), array('nid' => $this->nodes[2]->nid), ); $this->assertIdenticalResultset($view, $expected_result, $this->map); $view->destroy(); // Test offset for between operator. $view->set_display('default'); $view->init_handlers(); $view->filter['created']->operator = 'between'; $view->filter['created']->value['type'] = 'offset'; $view->filter['created']->value['max'] = '+2 days'; $view->filter['created']->value['min'] = '+1 hour'; $view->execute_display('default'); $expected_result = array( array('nid' => $this->nodes[3]->nid), ); $this->assertIdenticalResultset($view, $expected_result, $this->map); $view->destroy(); // Test "first day of" type of relative dates for between operator. $view->set_display('default'); $view->init_handlers(); $view->filter['created']->operator = 'between'; $view->filter['created']->value['type'] = 'offset'; $view->filter['created']->value['max'] = 'last day of January 1970'; $view->filter['created']->value['min'] = 'first day of January 1970'; $view->execute_display('default'); $expected_result = array( array('nid' => $this->nodes[0]->nid), array('nid' => $this->nodes[1]->nid), array('nid' => $this->nodes[2]->nid), ); $this->assertIdenticalResultset($view, $expected_result, $this->map); $view->destroy(); } /** * Tests the filter operator between/not between. */ function testBetween() { // Test between with min and max. $view = $this->views_test_between(); $view->set_display('default'); $view->init_handlers(); $view->filter['created']->operator = 'between'; $view->filter['created']->value['min'] = format_date(150000, 'custom', 'Y-m-d H:s'); $view->filter['created']->value['max'] = format_date(250000, 'custom', 'Y-m-d H:s'); $view->execute_display('default'); $expected_result = array( array('nid' => $this->nodes[1]->nid), ); $this->assertIdenticalResultset($view, $expected_result, $this->map); $view->destroy(); // Test between with just max. $view = $this->views_test_between(); $view->set_display('default'); $view->init_handlers(); $view->filter['created']->operator = 'between'; $view->filter['created']->value['max'] = format_date(250000, 'custom', 'Y-m-d H:s'); $view->execute_display('default'); $expected_result = array( array('nid' => $this->nodes[0]->nid), array('nid' => $this->nodes[1]->nid), ); $this->assertIdenticalResultset($view, $expected_result, $this->map); $view->destroy(); // Test not between with min and max. $view = $this->views_test_between(); $view->set_display('default'); $view->init_handlers(); $view->filter['created']->operator = 'not between'; $view->filter['created']->value['min'] = format_date(150000, 'custom', 'Y-m-d H:s'); $view->filter['created']->value['max'] = format_date(250000, 'custom', 'Y-m-d H:s'); $view->execute_display('default'); $expected_result = array( array('nid' => $this->nodes[0]->nid), array('nid' => $this->nodes[2]->nid), array('nid' => $this->nodes[3]->nid), ); $this->assertIdenticalResultset($view, $expected_result, $this->map); $view->destroy(); // Test not between with just max. $view = $this->views_test_between(); $view->set_display('default'); $view->init_handlers(); $view->filter['created']->operator = 'not between'; $view->filter['created']->value['max'] = format_date(150000, 'custom', 'Y-m-d H:s'); $view->execute_display('default'); $expected_result = array( array('nid' => $this->nodes[1]->nid), array('nid' => $this->nodes[2]->nid), array('nid' => $this->nodes[3]->nid), ); $this->assertIdenticalResultset($view, $expected_result, $this->map); $view->destroy(); } /** * Make sure the validation callbacks works. */ function testUiValidation() { $view = $this->views_test_between(); $view->save(); $admin_user = $this->drupalCreateUser(array('administer views', 'administer site configuration')); $this->drupalLogin($admin_user); menu_rebuild(); $this->drupalGet('admin/structure/views/view/test_filter_date_between/edit'); $this->drupalGet('admin/structure/views/nojs/config-item/test_filter_date_between/default/filter/created'); $edit = array(); // Generate a definitive wrong value, which should be checked by validation. $edit['options[value][value]'] = $this->randomString() . '-------'; $this->drupalPost(NULL, $edit, t('Apply')); $this->assertText(t('Invalid date format.'), 'Make sure that validation is runned and the invalidate date format is identified.'); } function views_test_between() { $view = new view; $view->name = 'test_filter_date_between'; $view->description = ''; $view->tag = ''; $view->base_table = 'node'; $view->human_name = ''; $view->core = 0; $view->api_version = '3.0'; $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */ /* Display: Master */ $handler = $view->new_display('default', 'Master', 'default'); $handler->display->display_options['access']['type'] = 'none'; $handler->display->display_options['cache']['type'] = 'none'; $handler->display->display_options['query']['type'] = 'views_query'; $handler->display->display_options['query']['options']['query_comment'] = FALSE; $handler->display->display_options['exposed_form']['type'] = 'basic'; $handler->display->display_options['pager']['type'] = 'full'; $handler->display->display_options['style_plugin'] = 'default'; $handler->display->display_options['row_plugin'] = 'fields'; /* Field: Content: Nid */ $handler->display->display_options['fields']['nid']['id'] = 'nid'; $handler->display->display_options['fields']['nid']['table'] = 'node'; $handler->display->display_options['fields']['nid']['field'] = 'nid'; /* Filter criterion: Content: Post date */ $handler->display->display_options['filters']['created']['id'] = 'created'; $handler->display->display_options['filters']['created']['table'] = 'node'; $handler->display->display_options['filters']['created']['field'] = 'created'; return $view; } function views_test_offset() { $view = $this->views_test_between(); return $view; } }
Close