summaryrefslogtreecommitdiff
path: root/kolab.org/www/drupal-7.15/sites/all/modules/views/tests/views_translatable.test
diff options
context:
space:
mode:
Diffstat (limited to 'kolab.org/www/drupal-7.15/sites/all/modules/views/tests/views_translatable.test')
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/tests/views_translatable.test25
1 files changed, 20 insertions, 5 deletions
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/tests/views_translatable.test b/kolab.org/www/drupal-7.15/sites/all/modules/views/tests/views_translatable.test
index 515a33d..0cb27e4 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/tests/views_translatable.test
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/tests/views_translatable.test
@@ -1,5 +1,13 @@
<?php
+/**
+ * @file
+ * Definition of ViewsTranslatableTest.
+ */
+
+/**
+ * Tests Views pluggable translations.
+ */
class ViewsTranslatableTest extends ViewsSqlTest {
var $strings;
@@ -11,7 +19,7 @@ class ViewsTranslatableTest extends ViewsSqlTest {
);
}
- /*
+ /**
* The views plugin definition. Override it if you test provides a plugin.
*/
public function viewsPlugins() {
@@ -40,7 +48,7 @@ class ViewsTranslatableTest extends ViewsSqlTest {
}
/**
- * Test the unpack translation funtionality.
+ * Tests the unpack translation funtionality.
*/
public function testUnpackTranslatable() {
$view = $this->view_unpack_translatable();
@@ -74,8 +82,7 @@ class ViewsTranslatableTest extends ViewsSqlTest {
public function testTranslation() {
$view = $this->view_unpack_translatable();
$view->set_display('default');
- $view->pre_execute();
- $view->execute();
+ $this->executeView($view);
$expected_strings = array();
foreach ($this->strings as $string) {
@@ -109,12 +116,15 @@ class ViewsTranslatableTest extends ViewsSqlTest {
'Offset1' => array('pager', 'expose', 'offset_label'),
'Master1' => array('title'),
'title1' => array('title'),
+ 'Tag first1' => array('pager', 'tags', 'first'),
+ 'Tag prev1' => array('pager', 'tags', 'previous'),
+ 'Tag next1' => array('pager', 'tags', 'next'),
+ 'Tag last1' => array('pager', 'tags', 'last'),
'Items per page1' => array('pager', 'expose', 'items_per_page_label'),
'fieldlabel1' => array('field', 'node', 'nid', 'label'),
'filterlabel1' => array('filter', 'node', 'nid', 'expose', 'label'),
'- All -' => array('pager', 'expose', 'items_per_page_options_all_label'),
);
-
foreach ($translatables as $translatable) {
$this->assertEqual($translatable['keys'], $this->string_keys[$translatable['value']]);
}
@@ -148,6 +158,11 @@ class ViewsTranslatableTest extends ViewsSqlTest {
$handler->display->display_options['pager']['options']['items_per_page'] = '10';
$handler->display->display_options['pager']['options']['offset'] = '0';
$handler->display->display_options['pager']['options']['id'] = '0';
+ $handler->display->display_options['pager']['options']['quantity'] = '9';
+ $handler->display->display_options['pager']['options']['tags']['first'] = 'Tag first1';
+ $handler->display->display_options['pager']['options']['tags']['previous'] = 'Tag prev1';
+ $handler->display->display_options['pager']['options']['tags']['next'] = 'Tag next1';
+ $handler->display->display_options['pager']['options']['tags']['last'] = 'Tag last1';
$handler->display->display_options['pager']['options']['expose']['items_per_page'] = TRUE;
$handler->display->display_options['pager']['options']['expose']['items_per_page_label'] = 'Items per page1';
$handler->display->display_options['pager']['options']['expose']['offset'] = TRUE;