Commit 936662b6 authored by jhodgdon's avatar jhodgdon

Issue #2145083 by TR, longwave, dawehner: Fix some grammatical badness mostly...

Issue #2145083 by TR, longwave, dawehner: Fix some grammatical badness mostly in Views tests and comments
parent 80fbd33d
......@@ -844,7 +844,7 @@ protected function addSelfTokens(&$tokens, $item) {
$tokens['[' . $this->options['id'] . '-' . $id . ']'] = filter_xss_admin($raw[$id]);
}
else {
// Take sure that empty values are replaced as well.
// Make sure that empty values are replaced as well.
$tokens['[' . $this->options['id'] . '-' . $id . ']'] = '';
}
}
......
......@@ -10,10 +10,11 @@
* - Test on a generic entity not on a node.
*
* What has to be tested:
* - Take sure that every wanted field is added to the according entity type.
* - Take sure the joins are done correct.
* - Use basic fields and take sure that the full wanted object is build.
* - Use relationships between different entity types, for example node and the node author(user).
* - Make sure that every wanted field is added to the according entity type.
* - Make sure the joins are done correctly.
* - Use basic fields and make sure that the full wanted object is built.
* - Use relationships between different entity types, for example node and
* the node author(user).
*/
namespace Drupal\field\Tests\Views;
......
......@@ -137,7 +137,7 @@ public function _testFormatterSimpleFieldRender() {
);
$this->executeView($view);
// Take sure that the formatter works as expected.
// Make sure that the formatter works as expected.
// @TODO: actually there should be a specific formatter.
for ($i = 0; $i < 2; $i++) {
$rendered_field = $view->style_plugin->getField($i, $this->fields[0]->getFieldName());
......@@ -163,7 +163,7 @@ public function _testMultipleFieldRender() {
foreach ($pure_items as $j => $item) {
$items[] = $pure_items[$j]['value'];
}
$this->assertEqual($rendered_field, implode(', ', $items), 'Take sure that the amount of items are limited.');
$this->assertEqual($rendered_field, implode(', ', $items), 'Make sure that the amount of items is limited.');
}
// Test that an empty field is rendered without error.
......@@ -186,7 +186,7 @@ public function _testMultipleFieldRender() {
foreach ($pure_items as $j => $item) {
$items[] = $pure_items[$j]['value'];
}
$this->assertEqual($rendered_field, implode(', ', $items), 'Take sure that the amount of items are limited.');
$this->assertEqual($rendered_field, implode(', ', $items), 'Make sure that the amount of items is limited.');
}
$view->destroy();
......@@ -207,7 +207,7 @@ public function _testMultipleFieldRender() {
foreach ($pure_items as $j => $item) {
$items[] = $pure_items[$j]['value'];
}
$this->assertEqual($rendered_field, implode(', ', $items), 'Take sure that the amount of items are limited.');
$this->assertEqual($rendered_field, implode(', ', $items), 'Make sure that the amount of items is limited.');
}
$view->destroy();
......@@ -225,7 +225,7 @@ public function _testMultipleFieldRender() {
$pure_items = $this->nodes[$i]->{$field_name}->getValue();
$items[] = $pure_items[0]['value'];
$items[] = $pure_items[4]['value'];
$this->assertEqual($rendered_field, implode(', ', $items), 'Take sure that the amount of items are limited.');
$this->assertEqual($rendered_field, implode(', ', $items), 'Make sure that the amount of items is limited.');
}
$view->destroy();
......@@ -245,7 +245,7 @@ public function _testMultipleFieldRender() {
foreach ($pure_items as $j => $item) {
$items[] = $pure_items[$j]['value'];
}
$this->assertEqual($rendered_field, implode(':', $items), 'Take sure that the amount of items are limited.');
$this->assertEqual($rendered_field, implode(':', $items), 'Make sure that the amount of items is limited.');
}
}
......
......@@ -20,7 +20,7 @@
class Search extends ArgumentPluginBase {
/**
* Take sure that parseSearchExpression is runned and everything is set up for it.
* Make sure that parseSearchExpression is run and everything is set up.
*
* @param $input
* The search phrase which was input by the user.
......@@ -83,7 +83,7 @@ public function query($group_by = FALSE) {
$conditions = $this->search_query->conditions();
$condition_conditions =& $conditions->conditions();
foreach ($condition_conditions as $key => &$condition) {
// Take sure we just look at real conditions.
// Make sure we just look at real conditions.
if (is_numeric($key)) {
// Replace the conditions with the table alias of views.
$this->search_query->condition_replace_string('d.', "$search_dataset.", $condition);
......
......@@ -91,7 +91,7 @@ public function validateExposed(&$form, &$form_state) {
}
/**
* Take sure that parseSearchExpression is runned and everything is set up for it.
* Make sure that parseSearchExpression is run and everything is set up.
*
* @param $input
* The search phrase which was input by the user.
......@@ -163,7 +163,7 @@ public function query() {
$conditions = $this->search_query->conditions();
$condition_conditions =& $conditions->conditions();
foreach ($condition_conditions as $key => &$condition) {
// Take sure we just look at real conditions.
// Make sure we just look at real conditions.
if (is_numeric($key)) {
// Replace the conditions with the table alias of views.
$this->search_query->condition_replace_string('d.', "$search_dataset.", $condition);
......
......@@ -1252,7 +1252,7 @@ public function renderText($alter) {
$more_link_path = $this->options['alter']['more_link_path'];
$more_link_path = strip_tags(decode_entities(strtr($more_link_path, $tokens)));
// Take sure that paths which was runned through url() does work as well.
// Make sure that paths which were run through url() work as well.
$base_path = base_path();
// Checks whether the path starts with the base_path.
if (strpos($more_link_path, $base_path) === 0) {
......@@ -1645,7 +1645,7 @@ public function adminLabel($short = FALSE) {
* - max_length: Maximum length of the string, the rest gets truncated.
* - word_boundary: Trim only on a word boundary.
* - ellipsis: Show an ellipsis (...) at the end of the trimmed string.
* - html: Take sure that the html is correct.
* - html: Make sure that the html is correct.
*
* @param string $value
* The string which should be trimmed.
......
......@@ -198,7 +198,7 @@ public function validateOptionsForm(&$form, &$form_state) {
form_set_error('pager_options][expose][items_per_page_options', $form_state, t('Insert a list of integer numeric values separated by commas: e.g: 10, 20, 50, 100'));
}
// Take sure that the items_per_page is part of the expose settings.
// Make sure that the items_per_page is part of the expose settings.
if (!empty($form_state['values']['pager_options']['expose']['items_per_page']) && !empty($form_state['values']['pager_options']['items_per_page'])) {
$items_per_page = $form_state['values']['pager_options']['items_per_page'];
if (array_search($items_per_page, $options) === FALSE) {
......
......@@ -166,7 +166,7 @@ protected function getTemporaryView() {
}
/**
* When the form is submitted, take sure to clear the subquery string cache.
* When the form is submitted, make sure to clear the subquery string cache.
*/
public function submitOptionsForm(&$form, &$form_state) {
$cid = 'views_relationship_groupwise_max:' . $this->view->storage->id() . ':' . $this->view->current_display . ':' . $this->options['id'];
......
......@@ -438,7 +438,7 @@ public function evenEmpty() {
}
public function wizardSubmit(&$form, &$form_state, WizardInterface $wizard, &$display_options, $display_type) {
// If any of the displays use the table style, take sure that the fields
// If any of the displays use the table style, make sure that the fields
// always have a labels by unsetting the override.
foreach ($display_options['default']['fields'] as &$field) {
unset($field['label']);
......
......@@ -269,7 +269,7 @@ public function testRelationshipUI() {
$expected_options = array('none', 'nid');
$this->assertEqual($options, $expected_options);
// Remove the relationship and take sure no relationship option appears.
// Remove the relationship and make sure no relationship option appears.
$this->drupalPostForm('admin/structure/views/nojs/config-item/test_handler_relationships/default/relationship/nid', array(), t('Remove'));
$this->drupalGet($handler_options_path);
$this->assertNoFieldByName($relationship_name, 'Make sure that no relationship option is available');
......
......@@ -149,8 +149,8 @@ public function testFilterGroupsOverriding() {
// mark is as overridden, yes FALSE, means overridden.
$view->displayHandlers->get('page')->setOverride('filter_groups', FALSE);
$this->assertFalse($view->displayHandlers->get('page')->isDefaulted('filter_groups'), "Take sure that 'filter_groups' is marked as overridden.");
$this->assertFalse($view->displayHandlers->get('page')->isDefaulted('filters'), "Take sure that 'filters'' is marked as overridden.");
$this->assertFalse($view->displayHandlers->get('page')->isDefaulted('filter_groups'), "Make sure that 'filter_groups' is marked as overridden.");
$this->assertFalse($view->displayHandlers->get('page')->isDefaulted('filters'), "Make sure that 'filters'' is marked as overridden.");
}
/**
......
......@@ -239,11 +239,11 @@ function testCustomRowClasses() {
foreach ($rows as $row) {
$attributes = $row->attributes();
$class = (string) $attributes['class'][0];
$this->assertTrue(strpos($class, $random_name) !== FALSE, 'Take sure that a custom css class is added to the output.');
$this->assertTrue(strpos($class, $random_name) !== FALSE, 'Make sure that a custom css class is added to the output.');
// Check token replacement.
$name = $view->field['name']->getValue($view->result[$count]);
$this->assertTrue(strpos($class, "test-token-$name") !== FALSE, 'Take sure that a token in custom css class is replaced.');
$this->assertTrue(strpos($class, "test-token-$name") !== FALSE, 'Make sure that a token in custom css class is replaced.');
$count++;
}
......
......@@ -28,7 +28,7 @@ public static function getInfo() {
}
/**
* Take sure that the default css classes works as expected.
* Make sure that the default css classes works as expected.
*/
function testDefaultRowClasses() {
$view = views_get_view('test_view');
......@@ -43,20 +43,20 @@ function testDefaultRowClasses() {
$count++;
$attributes = $row->attributes();
$class = (string) $attributes['class'][0];
// Take sure that each row has a row css class.
$this->assertTrue(strpos($class, "views-row-$count") !== FALSE, 'Take sure that each row has a row css class.');
// Take sure that the odd/even classes are set right.
// Make sure that each row has a row css class.
$this->assertTrue(strpos($class, "views-row-$count") !== FALSE, 'Make sure that each row has a row css class.');
// Make sure that the odd/even classes are set right.
$odd_even = $count % 2 == 0 ? 'even' : 'odd';
$this->assertTrue(strpos($class, "views-row-$odd_even") !== FALSE, 'Take sure that the odd/even classes are set right.');
$this->assertTrue(strpos($class, "views-row-$odd_even") !== FALSE, 'Make sure that the odd/even classes are set right.');
if ($count == 1) {
$this->assertTrue(strpos($class, "views-row-first") !== FALSE, 'Take sure that the first class is set right.');
$this->assertTrue(strpos($class, "views-row-first") !== FALSE, 'Make sure that the first class is set right.');
}
elseif ($count == $count_result) {
$this->assertTrue(strpos($class, "views-row-last") !== FALSE, 'Take sure that the last class is set right.');
$this->assertTrue(strpos($class, "views-row-last") !== FALSE, 'Make sure that the last class is set right.');
}
$this->assertTrue(strpos($class, 'views-row') !== FALSE, 'Take sure that the views row class is set right.');
$this->assertTrue(strpos($class, 'views-row') !== FALSE, 'Make sure that the views row class is set right.');
}
}
......
......@@ -1235,7 +1235,7 @@ function _views_query_tag_alter_condition(AlterableInterface $query, &$condition
_views_query_tag_alter_condition($query, $sub_conditions, $substitutions);
}
// $condition['value'] is a subquery so alter the subquery recursive.
// Therefore take sure to get the metadata of the main query.
// Therefore make sure to get the metadata of the main query.
if (is_object($condition['value'])) {
$subquery = $condition['value'];
$subquery->addMetaData('views_substitutions', $query->getMetaData('views_substitutions'));
......
......@@ -194,7 +194,7 @@ Drupal.viewsUi.AddItemForm.prototype.handleCheck = function (event) {
}
else {
var position = $.inArray(label, this.checkedItems);
// Delete the item from the list and take sure that the list doesn't have undefined items left.
// Delete the item from the list and make sure that the list doesn't have undefined items left.
for (var i = 0; i < this.checkedItems.length; i++) {
if (i === position) {
this.checkedItems.splice(i, 1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment