Issue #3138746 by jungle, rajandro, sja112, longwave, jameszhang023, quietone, dww: Fix 45 "shouldBeCamelCased" and related typos in core

merge-requests/25/head
Alex Pott 2020-11-09 11:14:31 +00:00
parent 231165730f
commit 0eec7fe50d
No known key found for this signature in database
GPG Key ID: 31905460D4A69276
52 changed files with 178 additions and 221 deletions

View File

@ -230,9 +230,9 @@ $databases = [];
* Sample Database configuration format for a driver in a contributed module:
* @code
* $databases['default']['default'] = [
* 'driver' => 'mydriver',
* 'namespace' => 'Drupal\mymodule\Driver\Database\mydriver',
* 'autoload' => 'modules/mymodule/src/Driver/Database/mydriver/',
* 'driver' => 'my_driver',
* 'namespace' => 'Drupal\my_module\Driver\Database\my_driver',
* 'autoload' => 'modules/my_module/src/Driver/Database/my_driver/',
* 'database' => 'databasename',
* 'username' => 'sqlusername',
* 'password' => 'sqlpassword',

View File

@ -382,10 +382,10 @@
* be an admin path). Here's an example using the configurable_language config
* entity:
* @code
* mymodule.myroute:
* path: '/admin/mypath/{configurable_language}'
* my_module.my_route:
* path: '/admin/my-path/{configurable_language}'
* defaults:
* _controller: '\Drupal\mymodule\MyController::myMethod'
* _controller: '\Drupal\my_module\MyController::myMethod'
* options:
* parameters:
* configurable_language:
@ -809,7 +809,7 @@
* arguments, but they all include an argument $container of type
* \Symfony\Component\DependencyInjection\ContainerInterface.
* If you are defining one of these classes, in the create() or
* createInstance() method, call $container->get('myservice.name') to
* createInstance() method, call $container->get('my_service.name') to
* instantiate a service. The results of these calls are generally passed to
* the class constructor and saved as member variables in the class.
* - For functions and class methods that do not have access to either of
@ -837,7 +837,7 @@
* @section sec_define Defining a service
* If your module needs to define a new service, here are the steps:
* - Choose a unique machine name for your service. Typically, this should
* start with your module name. Example: mymodule.myservice.
* start with your module name. Example: my_module.my_service.
* - Create a PHP interface to define what your service does.
* - Create a default class implementing your interface that provides your
* service. If your class needs to use existing services (such as database

View File

@ -577,7 +577,7 @@ function template_preprocess_form_element_label(&$variables) {
* array('my_function_2', array()),
* ),
* 'finished' => 'my_finished_callback',
* 'file' => 'path_to_file_containing_myfunctions',
* 'file' => 'path_to_file_containing_my_functions',
* );
* batch_set($batch);
* // Only needed if not inside a form _submit handler.

View File

@ -184,7 +184,7 @@ class PhpBackend implements CacheBackendInterface {
* {@inheritdoc}
*/
public function invalidate($cid) {
$this->invalidatebyHash($this->normalizeCid($cid));
$this->invalidateByHash($this->normalizeCid($cid));
}
/**
@ -193,7 +193,7 @@ class PhpBackend implements CacheBackendInterface {
* @param string $cidhash
* The hashed version of the original cache ID after being normalized.
*/
protected function invalidatebyHash($cidhash) {
protected function invalidateByHash($cidhash) {
if ($item = $this->getByHash($cidhash)) {
$item->expire = REQUEST_TIME - 1;
$this->writeItem($cidhash, $item);
@ -214,7 +214,7 @@ class PhpBackend implements CacheBackendInterface {
*/
public function invalidateAll() {
foreach ($this->storage()->listAll() as $cidhash) {
$this->invalidatebyHash($cidhash);
$this->invalidateByHash($cidhash);
}
}

View File

@ -175,7 +175,7 @@ use Drupal\Core\Database\Query\SelectInterface;
* try {
* $id = $connection->insert('example')
* ->fields(array(
* 'field1' => 'mystring',
* 'field1' => 'string',
* 'field2' => 5,
* ))
* ->execute();

View File

@ -421,51 +421,51 @@ function hook_install_tasks(&$install_state) {
// Here, we define a variable to allow tasks to indicate that a particular,
// processor-intensive batch process needs to be triggered later on in the
// installation.
$myprofile_needs_batch_processing = \Drupal::state()->get('myprofile.needs_batch_processing', FALSE);
$my_profile_needs_batch_processing = \Drupal::state()->get('my_profile.needs_batch_processing', FALSE);
$tasks = [
// This is an example of a task that defines a form which the user who is
// installing the site will be asked to fill out. To implement this task,
// your profile would define a function named myprofile_data_import_form()
// your profile would define a function named my_profile_data_import_form()
// as a normal form API callback function, with associated validation and
// submit handlers. In the submit handler, in addition to saving whatever
// other data you have collected from the user, you might also call
// \Drupal::state()->set('myprofile.needs_batch_processing', TRUE) if the
// \Drupal::state()->set('my_profile.needs_batch_processing', TRUE) if the
// user has entered data which requires that batch processing will need to
// occur later on.
'myprofile_data_import_form' => [
'my_profile_data_import_form' => [
'display_name' => t('Data import options'),
'type' => 'form',
],
// Similarly, to implement this task, your profile would define a function
// named myprofile_settings_form() with associated validation and submit
// named my_profile_settings_form() with associated validation and submit
// handlers. This form might be used to collect and save additional
// information from the user that your profile needs. There are no extra
// steps required for your profile to act as an "installation wizard"; you
// can simply define as many tasks of type 'form' as you wish to execute,
// and the forms will be presented to the user, one after another.
'myprofile_settings_form' => [
'my_profile_settings_form' => [
'display_name' => t('Additional options'),
'type' => 'form',
],
// This is an example of a task that performs batch operations. To
// implement this task, your profile would define a function named
// myprofile_batch_processing() which returns a batch API array definition
// my_profile_batch_processing() which returns a batch API array definition
// that the installer will use to execute your batch operations. Due to the
// 'myprofile.needs_batch_processing' variable used here, this task will be
// 'my_profile.needs_batch_processing' variable used here, this task will be
// hidden and skipped unless your profile set it to TRUE in one of the
// previous tasks.
'myprofile_batch_processing' => [
'my_profile_batch_processing' => [
'display_name' => t('Import additional data'),
'display' => $myprofile_needs_batch_processing,
'display' => $my_profile_needs_batch_processing,
'type' => 'batch',
'run' => $myprofile_needs_batch_processing ? INSTALL_TASK_RUN_IF_NOT_COMPLETED : INSTALL_TASK_SKIP,
'run' => $my_profile_needs_batch_processing ? INSTALL_TASK_RUN_IF_NOT_COMPLETED : INSTALL_TASK_SKIP,
],
// This is an example of a task that will not be displayed in the list that
// the user sees. To implement this task, your profile would define a
// function named myprofile_final_site_setup(), in which additional,
// function named my_profile_final_site_setup(), in which additional,
// automated site setup operations would be performed. Since this is the
// last task defined by your profile, you should also use this function to
// call \Drupal::state()->delete('myprofile.needs_batch_processing') and
// call \Drupal::state()->delete('my_profile.needs_batch_processing') and
// clean up the state that was used above. If you want the user to pass
// to the final Drupal installation tasks uninterrupted, return no output
// from this function. Otherwise, return themed output that the user will
@ -473,7 +473,7 @@ function hook_install_tasks(&$install_state) {
// tasks are complete, with a link to reload the current page and therefore
// pass on to the final Drupal installation tasks when the user is ready to
// do so).
'myprofile_final_site_setup' => [],
'my_profile_final_site_setup' => [],
];
return $tasks;
}
@ -499,7 +499,7 @@ function hook_install_tasks(&$install_state) {
function hook_install_tasks_alter(&$tasks, $install_state) {
// Replace the entire site configuration form provided by Drupal core
// with a custom callback function defined by this installation profile.
$tasks['install_configure_form']['function'] = 'myprofile_install_configure_form';
$tasks['install_configure_form']['function'] = 'my_profile_install_configure_form';
}
/**
@ -647,7 +647,7 @@ function hook_update_N(&$sandbox) {
'not null' => FALSE,
];
$schema = Database::getConnection()->schema();
$schema->addField('mytable1', 'newcol', $spec);
$schema->addField('my_table', 'newcol', $spec);
// Example of what to do if there is an error during your update.
if ($some_error_condition_met) {
@ -660,26 +660,26 @@ function hook_update_N(&$sandbox) {
// This must be the first run. Initialize the sandbox.
$sandbox['progress'] = 0;
$sandbox['current_pk'] = 0;
$sandbox['max'] = Database::getConnection()->query('SELECT COUNT([myprimarykey]) FROM {mytable1}')->fetchField();
$sandbox['max'] = Database::getConnection()->query('SELECT COUNT([my_primary_key]) FROM {my_table}')->fetchField();
}
// Update in chunks of 20.
$records = Database::getConnection()->select('mytable1', 'm')
->fields('m', ['myprimarykey', 'otherfield'])
->condition('myprimarykey', $sandbox['current_pk'], '>')
$records = Database::getConnection()->select('my_table', 'm')
->fields('m', ['my_primary_key', 'other_field'])
->condition('my_primary_key', $sandbox['current_pk'], '>')
->range(0, 20)
->orderBy('myprimarykey', 'ASC')
->orderBy('my_primary_key', 'ASC')
->execute();
foreach ($records as $record) {
// Here, you would make an update something related to this record. In this
// example, some text is added to the other field.
Database::getConnection()->update('mytable1')
->fields(['otherfield' => $record->otherfield . '-suffix'])
->condition('myprimarykey', $record->myprimarykey)
Database::getConnection()->update('my_table')
->fields(['other_field' => $record->other_field . '-suffix'])
->condition('my_primary_key', $record->my_primary_key)
->execute();
$sandbox['progress']++;
$sandbox['current_pk'] = $record->myprimarykey;
$sandbox['current_pk'] = $record->my_primary_key;
}
$sandbox['#finished'] = empty($sandbox['max']) ? 1 : ($sandbox['progress'] / $sandbox['max']);

View File

@ -70,7 +70,7 @@ abstract class EntityReferenceFormatterBase extends FormatterBase {
* {@inheritdoc}
*
* @see ::prepareView()
* @see ::getEntitiestoView()
* @see ::getEntitiesToView()
*/
public function view(FieldItemListInterface $items, $langcode = NULL) {
$elements = parent::view($items, $langcode);

View File

@ -186,7 +186,7 @@
* @code
* function THEME_page_attachments_alter(array &$page) {
* if ($some_condition) {
* $page['#attached']['library'][] = 'mytheme/something';
* $page['#attached']['library'][] = 'my_theme/something';
* }
* }
* @endcode

View File

@ -111,7 +111,7 @@
*
* If the route has placeholders (see @ref sec_placeholders above) the
* placeholders will be passed to the method (using reflection) by name.
* For example, the placeholder '{myvar}' in a route will become the $myvar
* For example, the placeholder '{my_var}' in a route will become the $my_var
* parameter to the method.
*
* Additionally, if a parameter is typed to one of the following special classes

View File

@ -11,7 +11,7 @@ use Twig\Loader\FilesystemLoader as TwigFilesystemLoader;
*
* This loader adds module and theme template paths as namespaces to the Twig
* filesystem loader so that templates can be referenced by namespace, like
* @block/block.html.twig or @mytheme/page.html.twig.
* @block/block.html.twig or @my_theme/page.html.twig.
*/
class FilesystemLoader extends TwigFilesystemLoader {

View File

@ -462,7 +462,7 @@
// 1. /nojs/
// 2. /nojs$ - The end of a URL string.
// 3. /nojs? - Followed by a query (e.g. path/nojs?destination=foobar).
// 4. /nojs# - Followed by a fragment (e.g.: path/nojs#myfragment).
// 4. /nojs# - Followed by a fragment (e.g.: path/nojs#my-fragment).
const originalUrl = this.url;
/**

View File

@ -144,7 +144,6 @@ bazinga
bazqux
bazs
beatle
becalled
beforeclose
beforecreate
beforeend
@ -355,7 +354,6 @@ data's
databasefilename
databasename
datapoint
dataprovider
datas
datatypes
datefield
@ -438,6 +436,7 @@ discoverability
displaymessage
displayname
distincted
distro
ditka
divs
dnumber
@ -528,7 +527,6 @@ enim
enoki
enregistrer
entit
entitiesto
entitynodeedit
entityreference
entitytype
@ -580,7 +578,6 @@ fieldable
fieldapi
fieldblock
fieldbody
fieldby
fieldgroups
fielditem
fieldlinks
@ -778,7 +775,6 @@ installable
instantiator
internal's
introspectable
invalidateby
invalidators
invalididentifier
invokable
@ -788,7 +784,6 @@ isam
isdst
isid
isinstallable
isnew
items's
itoa
itok
@ -862,7 +857,6 @@ libc
libellé
libicu
libmysqlclient
librariesby
libyaml
licious
lified
@ -1021,37 +1015,10 @@ muuh
muun
muuuh
myclabs
myclass
mydistro
mydriver
myeditor
myeditoroverride
myfragment
myfrontpage
myfunctions
mymenu
mymodule
mynewpassword
myothermenu
mypath
myprimarykey
myprofile
myproject
myrootuser
myroute
myselect
myservice
mysetting
mysite
mysqladmin
mysqldump
mystring
mytab
mytable
mytheme
mytype
myvalue
myvar
myverylongurl
myverylongurlexample
műveletek
@ -1120,9 +1087,6 @@ noschema
noslash
nosniff
nostart
nosuchcolumn
nosuchindex
nosuchtable
notag
notawordenglish
notawordgerman
@ -1175,11 +1139,6 @@ orgchart
origdir
oring
ossp
otherfield
otherjob
othername
otherpage
otherprofile
otsikko
outdata
outdent
@ -1694,7 +1653,6 @@ testkey
testlist
testload
testname
testnoschema
testproject
testproperty
testservice
@ -1906,7 +1864,6 @@ uri's
url's
urlalias
urldecoding
urlto
usecase
userid
userinfo

View File

@ -156,7 +156,7 @@ class BlockContentAccessHandlerTest extends KernelTestBase {
}
/**
* Dataprovider for testAccess().
* Data provider for testAccess().
*/
public function providerTestAccess() {
$cases = [

View File

@ -134,7 +134,7 @@ class DependentAccessTest extends UnitTestCase {
}
/**
* Dataprovider for all test methods.
* Data provider for all test methods.
*
* Provides test cases for calling setAccessDependency() or
* mergeAccessDependency() first. A call to either should behave the same on a

View File

@ -2,4 +2,4 @@ testitem: 'Since this file at least has top level schema in config_test.schema.y
testlist:
- 'Direct string items are identified and other items are'
- 'recognized as undefined types.'
testnoschema: 12
test_no_schema: 12

View File

@ -23,7 +23,7 @@ use Drupal\filter\FilterFormatInterface;
*/
function hook_editor_info_alter(array &$editors) {
$editors['some_other_editor']['label'] = t('A different name');
$editors['some_other_editor']['library']['module'] = 'myeditoroverride';
$editors['some_other_editor']['library']['module'] = 'my_editor_override';
}
/**

View File

@ -28,7 +28,7 @@ use Drupal\Component\Annotation\Plugin;
*
* @code
* @Editor(
* id = "myeditor",
* id = "my_editor",
* label = @Translation("My Editor"),
* supports_content_filtering = FALSE,
* supports_inline_editing = FALSE,

View File

@ -190,11 +190,11 @@ function hook_field_widget_info_alter(array &$info) {
* @see hook_field_widget_multivalue_form_alter()
*/
function hook_field_widget_form_alter(&$element, \Drupal\Core\Form\FormStateInterface $form_state, $context) {
// Add a css class to widget form elements for all fields of type mytype.
// Add a css class to widget form elements for all fields of type my_type.
$field_definition = $context['items']->getFieldDefinition();
if ($field_definition->getType() == 'mytype') {
if ($field_definition->getType() == 'my_type') {
// Be sure not to overwrite existing attributes.
$element['#attributes']['class'][] = 'myclass';
$element['#attributes']['class'][] = 'my-class';
}
}
@ -257,11 +257,11 @@ function hook_field_widget_WIDGET_TYPE_form_alter(&$element, \Drupal\Core\Form\F
* @see hook_field_widget_multivalue_WIDGET_TYPE_form_alter()
*/
function hook_field_widget_multivalue_form_alter(array &$elements, \Drupal\Core\Form\FormStateInterface $form_state, array $context) {
// Add a css class to widget form elements for all fields of type mytype.
// Add a css class to widget form elements for all fields of type my_type.
$field_definition = $context['items']->getFieldDefinition();
if ($field_definition->getType() == 'mytype') {
if ($field_definition->getType() == 'my_type') {
// Be sure not to overwrite existing attributes.
$elements['#attributes']['class'][] = 'myclass';
$elements['#attributes']['class'][] = 'my-class';
}
}

View File

@ -122,7 +122,7 @@ class FieldAttachStorageTest extends FieldKernelTestBase {
$values[$index][$field_name] = mt_rand(1, 127);
$entity->$field_name->setValue(['value' => $values[$index][$field_name]]);
}
$entity->enforceIsnew();
$entity->enforceIsNew();
$entity->save();
}

View File

@ -91,7 +91,7 @@ function hook_field_widget_third_party_settings_form(\Drupal\Core\Field\WidgetIn
*/
function hook_field_formatter_settings_summary_alter(array &$summary, array $context) {
// Append a message to the summary when an instance of foo_formatter has
// mysetting set to TRUE for the current view mode.
// my_setting set to TRUE for the current view mode.
if ($context['formatter']->getPluginId() == 'foo_formatter') {
if ($context['formatter']->getThirdPartySetting('my_module', 'my_setting')) {
$summary[] = t('My setting enabled.');
@ -114,7 +114,7 @@ function hook_field_formatter_settings_summary_alter(array &$summary, array $con
*/
function hook_field_widget_settings_summary_alter(array &$summary, array $context) {
// Append a message to the summary when an instance of foo_widget has
// mysetting set to TRUE for the current view mode.
// my_setting set to TRUE for the current view mode.
if ($context['widget']->getPluginId() == 'foo_widget') {
if ($context['widget']->getThirdPartySetting('my_module', 'my_setting')) {
$summary[] = t('My setting enabled.');

View File

@ -572,11 +572,11 @@ class LayoutBuilderTest extends BrowserTestBase {
// Create a new menu.
$this->drupalGet('admin/structure/menu/add');
$page->fillField('label', 'My Menu');
$page->fillField('id', 'mymenu');
$page->fillField('id', 'my-menu');
$page->pressButton('Save');
$this->drupalGet('admin/structure/menu/add');
$page->fillField('label', 'My Menu');
$page->fillField('id', 'myothermenu');
$page->fillField('id', 'my-other-menu');
$page->pressButton('Save');
$page->clickLink('Add link');
@ -595,7 +595,7 @@ class LayoutBuilderTest extends BrowserTestBase {
$assert_session->elementExists('css', '.layout--layout-test-dependencies-plugin');
$assert_session->elementExists('css', '.field--name-body');
$page->pressButton('Save layout');
$this->drupalPostForm('admin/structure/menu/manage/myothermenu/delete', [], 'Delete');
$this->drupalPostForm('admin/structure/menu/manage/my-other-menu/delete', [], 'Delete');
$this->drupalGet('admin/structure/types/manage/bundle_with_section_field/display/default/layout');
$assert_session->elementNotExists('css', '.layout--layout-test-dependencies-plugin');
$assert_session->elementExists('css', '.field--name-body');
@ -617,17 +617,17 @@ class LayoutBuilderTest extends BrowserTestBase {
// Assert that the blocks are visible, and save the layout.
$assert_session->pageTextContains('Powered by Drupal');
$assert_session->pageTextContains('My Menu');
$assert_session->elementExists('css', '.block.menu--mymenu');
$assert_session->elementExists('css', '.block.menu--my-menu');
$page->pressButton('Save layout');
// Delete the menu.
$this->drupalPostForm('admin/structure/menu/manage/mymenu/delete', [], 'Delete');
$this->drupalPostForm('admin/structure/menu/manage/my-menu/delete', [], 'Delete');
// Ensure that the menu block is gone, but that the other block remains.
$this->drupalGet('admin/structure/types/manage/bundle_with_section_field/display/default/layout');
$assert_session->pageTextContains('Powered by Drupal');
$assert_session->pageTextNotContains('My Menu');
$assert_session->elementNotExists('css', '.block.menu--mymenu');
$assert_session->elementNotExists('css', '.block.menu--my-menu');
}
/**

View File

@ -46,7 +46,7 @@ class LayoutEntityHelperTraitTest extends KernelTestBase {
}
/**
* Dataprovider for testGetSectionStorageForEntity().
* Data provider for testGetSectionStorageForEntity().
*/
public function providerTestGetSectionStorageForEntity() {
$data = [];
@ -119,7 +119,7 @@ class LayoutEntityHelperTraitTest extends KernelTestBase {
}
/**
* Dataprovider for testOriginalEntityUsesDefaultStorage().
* Data provider for testOriginalEntityUsesDefaultStorage().
*/
public function providerTestOriginalEntityUsesDefaultStorage() {
return [

View File

@ -43,7 +43,7 @@ class BlockComponentRenderArrayTest extends UnitTestCase {
protected $blockManager;
/**
* Dataprovider for test functions that should test block types.
* Data provider for test functions that should test block types.
*/
public function providerBlockTypes() {
return [

View File

@ -18,7 +18,7 @@ use Drupal\Tests\UnitTestCase;
class LayoutEntityHelperTraitTest extends UnitTestCase {
/**
* Dataprovider method for tests that need sections with inline blocks.
* Data provider method for tests that need sections with inline blocks.
*/
public function providerSectionsWithInlineComponents() {
$components = [];

View File

@ -125,8 +125,8 @@ function locale_translation_project_list() {
*
* Custom modules or themes can bring their own gettext translation file. To
* enable import of this file the module or theme defines "interface translation
* project = myproject" in its .info.yml file. This function will add a project
* "myproject" to the info data.
* project = my_project" in its .info.yml file. This function will add a project
* "my_project" to the info data.
*
* @param \Drupal\Core\Extension\Extension[] $data
* Array of .info.yml file data.

View File

@ -70,8 +70,8 @@ class NodeQueryAlterTest extends NodeTestBase {
public function testNodeQueryAlterLowLevelWithAccess() {
// User with access should be able to view 4 nodes.
try {
$query = Database::getConnection()->select('node', 'mytab')
->fields('mytab');
$query = Database::getConnection()->select('node', 'n')
->fields('n');
$query->addTag('node_access');
$query->addMetaData('op', 'view');
$query->addMetaData('account', $this->accessUser);
@ -111,8 +111,8 @@ class NodeQueryAlterTest extends NodeTestBase {
public function testNodeQueryAlterLowLevelNoAccess() {
// User without access should be able to view 0 nodes.
try {
$query = Database::getConnection()->select('node', 'mytab')
->fields('mytab');
$query = Database::getConnection()->select('node', 'n')
->fields('n');
$query->addTag('node_access');
$query->addMetaData('op', 'view');
$query->addMetaData('account', $this->noAccessUser);
@ -134,8 +134,8 @@ class NodeQueryAlterTest extends NodeTestBase {
public function testNodeQueryAlterLowLevelEditAccess() {
// User with view-only access should not be able to edit nodes.
try {
$query = Database::getConnection()->select('node', 'mytab')
->fields('mytab');
$query = Database::getConnection()->select('node', 'n')
->fields('n');
$query->addTag('node_access');
$query->addMetaData('op', 'update');
$query->addMetaData('account', $this->accessUser);
@ -175,8 +175,8 @@ class NodeQueryAlterTest extends NodeTestBase {
// privilege after adding the node_access record.
drupal_static_reset('node_access_view_all_nodes');
try {
$query = $connection->select('node', 'mytab')
->fields('mytab');
$query = $connection->select('node', 'n')
->fields('n');
$query->addTag('node_access');
$query->addMetaData('op', 'view');
$query->addMetaData('account', $this->noAccessUser);
@ -197,8 +197,8 @@ class NodeQueryAlterTest extends NodeTestBase {
\Drupal::state()->set('node_access_test.no_access_uid', $this->noAccessUser->id());
drupal_static_reset('node_access_view_all_nodes');
try {
$query = $connection->select('node', 'mytab')
->fields('mytab');
$query = $connection->select('node', 'n')
->fields('n');
$query->addTag('node_access');
$query->addMetaData('op', 'view');
$query->addMetaData('account', $this->noAccessUser);

View File

@ -27,7 +27,7 @@ class LayoutTestDependenciesPlugin extends LayoutDefault implements DependentPlu
*/
public function calculateDependencies() {
$dependencies = [];
$dependencies['config'][] = 'system.menu.myothermenu';
$dependencies['config'][] = 'system.menu.my-other-menu';
return $dependencies;
}

View File

@ -122,7 +122,7 @@ abstract class OffCanvasTestBase extends WebDriverTestBase {
}
/**
* Dataprovider that returns theme name as the sole argument.
* Data provider that returns theme name as the sole argument.
*/
public function themeDataProvider() {
$themes = $this->getTestThemes();

View File

@ -445,7 +445,7 @@ class UpdateCoreTest extends UpdateTestBase {
}
/**
* Dataprovider for testSecurityCoverageMessage().
* Data provider for testSecurityCoverageMessage().
*
* These test cases rely on the following fixtures containing the following
* releases:

View File

@ -75,8 +75,8 @@ class QueryGroupByTest extends ViewsKernelTestBase {
$types[$item->entity_test_name] = $item->num_records;
}
$this->assertEqual($types['name1'], 4, 'Groupby the name: name1 returned the expected amount of results.');
$this->assertEqual($types['name2'], 3, 'Groupby the name: name2 returned the expected amount of results.');
$this->assertEquals(4, $types['name1']);
$this->assertEquals(3, $types['name2']);
}
/**

View File

@ -36,8 +36,8 @@ if (in_array('--help', $_SERVER['argv']) || empty($_SERVER['argv'])) {
Generate Drupal password hashes from the shell.
Usage: {$script} [OPTIONS] "<plan-text password>"
Example: {$script} "mynewpassword"
Usage: {$script} [OPTIONS] "<plaintext password>"
Example: {$script} "my-new-password"
All arguments are long options.
@ -45,7 +45,7 @@ All arguments are long options.
"<password1>" ["<password2>" ["<password3>" ...]]
One or more plan-text passwords enclosed by double quotes. The
One or more plaintext passwords enclosed by double quotes. The
output hash may be manually entered into the
{users_field_data}.pass field to change a password via SQL to a
known value.

View File

@ -43,9 +43,9 @@ class DistributionProfileExistingSettingsTest extends InstallerTestBase {
],
];
// File API functions are not available yet.
$path = $this->siteDirectory . '/profiles/mydistro';
$path = $this->siteDirectory . '/profiles/my_distro';
mkdir($path, 0777, TRUE);
file_put_contents("$path/mydistro.info.yml", Yaml::encode($this->info));
file_put_contents("$path/my_distro.info.yml", Yaml::encode($this->info));
// Pre-configure hash salt.
// Any string is valid, so simply use the class name of this test.
@ -120,11 +120,11 @@ class DistributionProfileExistingSettingsTest extends InstallerTestBase {
$this->assertText($this->rootUser->getAccountName());
// Confirm that Drupal recognizes this distribution as the current profile.
$this->assertEqual(\Drupal::installProfile(), 'mydistro');
$this->assertEqual($this->config('core.extension')->get('profile'), 'mydistro', 'The install profile has been written to core.extension configuration.');
$this->assertEqual(\Drupal::installProfile(), 'my_distro');
$this->assertEqual($this->config('core.extension')->get('profile'), 'my_distro', 'The install profile has been written to core.extension configuration.');
$this->rebuildContainer();
$this->assertEqual(\Drupal::installProfile(), 'mydistro');
$this->assertEqual(\Drupal::installProfile(), 'my_distro');
}
}

View File

@ -33,15 +33,15 @@ class DistributionProfileTest extends InstallerTestBase {
'name' => 'My Distribution',
'install' => [
'theme' => 'bartik',
'finish_url' => '/myrootuser',
'finish_url' => '/root-user',
],
],
];
// File API functions are not available yet.
$path = $this->siteDirectory . '/profiles/mydistro';
$path = $this->siteDirectory . '/profiles/my_distro';
mkdir($path, 0777, TRUE);
file_put_contents("$path/mydistro.info.yml", Yaml::encode($this->info));
file_put_contents("$path/mydistro.install", "<?php function mydistro_install() {\Drupal::entityTypeManager()->getStorage('path_alias')->create(['path' => '/user/1', 'alias' => '/myrootuser'])->save();}");
file_put_contents("$path/my_distro.info.yml", Yaml::encode($this->info));
file_put_contents("$path/my_distro.install", "<?php function my_distro_install() {\Drupal::entityTypeManager()->getStorage('path_alias')->create(['path' => '/user/1', 'alias' => '/root-user'])->save();}");
}
/**
@ -71,14 +71,14 @@ class DistributionProfileTest extends InstallerTestBase {
* Confirms that the installation succeeded.
*/
public function testInstalled() {
$this->assertSession()->addressEquals('myrootuser');
$this->assertSession()->addressEquals('root-user');
$this->assertSession()->statusCodeEquals(200);
// Confirm that we are logged-in after installation.
$this->assertText($this->rootUser->getAccountName());
// Confirm that Drupal recognizes this distribution as the current profile.
$this->assertEqual(\Drupal::installProfile(), 'mydistro');
$this->assertEqual($this->config('core.extension')->get('profile'), 'mydistro', 'The install profile has been written to core.extension configuration.');
$this->assertEqual(\Drupal::installProfile(), 'my_distro');
$this->assertEqual($this->config('core.extension')->get('profile'), 'my_distro', 'The install profile has been written to core.extension configuration.');
}
}

View File

@ -48,9 +48,9 @@ class DistributionProfileTranslationQueryTest extends InstallerTestBase {
],
];
// File API functions are not available yet.
$path = $this->root . DIRECTORY_SEPARATOR . $this->siteDirectory . '/profiles/mydistro';
$path = $this->root . DIRECTORY_SEPARATOR . $this->siteDirectory . '/profiles/my_distro';
mkdir($path, 0777, TRUE);
file_put_contents("$path/mydistro.info.yml", Yaml::encode($this->info));
file_put_contents("$path/my_distro.info.yml", Yaml::encode($this->info));
// Place a custom local translation in the translations directory.
mkdir($this->root . '/' . $this->siteDirectory . '/files/translations', 0777, TRUE);
file_put_contents($this->root . '/' . $this->siteDirectory . '/files/translations/drupal-8.0.0.de.po', $this->getPo('de'));

View File

@ -50,9 +50,9 @@ class DistributionProfileTranslationTest extends InstallerTestBase {
],
];
// File API functions are not available yet.
$path = $this->root . DIRECTORY_SEPARATOR . $this->siteDirectory . '/profiles/mydistro';
$path = $this->root . DIRECTORY_SEPARATOR . $this->siteDirectory . '/profiles/my_distro';
mkdir($path, 0777, TRUE);
file_put_contents("$path/mydistro.info.yml", Yaml::encode($this->info));
file_put_contents("$path/my_distro.info.yml", Yaml::encode($this->info));
// Place a custom local translation in the translations directory.
mkdir($this->root . '/' . $this->siteDirectory . '/files/translations', 0777, TRUE);

View File

@ -96,7 +96,7 @@ class ConfigSchemaTest extends KernelTestBase {
$expected['definition_class'] = '\Drupal\Core\TypedData\DataDefinition';
$expected['unwrap_for_canonical_representation'] = TRUE;
$this->assertEqual($definition, $expected, 'Automatic type detected for a list is undefined.');
$definition = $config->get('testnoschema')->getDataDefinition()->toArray();
$definition = $config->get('test_no_schema')->getDataDefinition()->toArray();
$expected = [];
$expected['label'] = 'Undefined';
$expected['class'] = Undefined::class;

View File

@ -39,7 +39,7 @@ class RegressionTest extends DatabaseTestBase {
*/
public function testDBTableExists() {
$this->assertTrue($this->connection->schema()->tableExists('test'), 'Returns true for existent table.');
$this->assertFalse($this->connection->schema()->tableExists('nosuchtable'), 'Returns false for nonexistent table.');
$this->assertFalse($this->connection->schema()->tableExists('no_such_table'), 'Returns false for nonexistent table.');
}
/**
@ -48,7 +48,7 @@ class RegressionTest extends DatabaseTestBase {
public function testDBFieldExists() {
$schema = $this->connection->schema();
$this->assertTrue($schema->fieldExists('test', 'name'), 'Returns true for existent column.');
$this->assertFalse($schema->fieldExists('test', 'nosuchcolumn'), 'Returns false for nonexistent column.');
$this->assertFalse($schema->fieldExists('test', 'no_such_column'), 'Returns false for nonexistent column.');
}
/**
@ -56,7 +56,7 @@ class RegressionTest extends DatabaseTestBase {
*/
public function testDBIndexExists() {
$this->assertTrue($this->connection->schema()->indexExists('test', 'ages'), 'Returns true for existent index.');
$this->assertFalse($this->connection->schema()->indexExists('test', 'nosuchindex'), 'Returns false for nonexistent index.');
$this->assertFalse($this->connection->schema()->indexExists('test', 'no_such_index'), 'Returns false for nonexistent index.');
}
}

View File

@ -324,12 +324,12 @@ class SelectComplexTest extends DatabaseTestBase {
public function testJoinTwice() {
$query = $this->connection->select('test')->fields('test');
$alias = $query->join('test', 'test', 'test.job = %alias.job');
$query->addField($alias, 'name', 'othername');
$query->addField($alias, 'job', 'otherjob');
$query->addField($alias, 'name', 'other_name');
$query->addField($alias, 'job', 'other_job');
$query->where("$alias.name <> test.name");
$crowded_job = $query->execute()->fetch();
$this->assertEqual($crowded_job->job, $crowded_job->otherjob, 'Correctly joined same table twice.');
$this->assertNotEqual($crowded_job->name, $crowded_job->othername, 'Correctly joined same table twice.');
$this->assertEqual($crowded_job->job, $crowded_job->other_job, 'Correctly joined same table twice.');
$this->assertNotEqual($crowded_job->name, $crowded_job->other_name, 'Correctly joined same table twice.');
}
/**

View File

@ -517,7 +517,7 @@ class EntityQueryAggregateTest extends EntityKernelTestBase {
['field_test_1' => 1, 'field_test_2_count' => 2],
]);
// Groupby and aggregate by fieldapi field, and sort by the aggregated
// Group by and aggregate by Field API field, and sort by the aggregated
// field.
$this->queryResult = $this->entityStorage->getAggregateQuery()
->groupBy('field_test_1')

View File

@ -99,7 +99,7 @@ class ModuleInstallerTest extends KernelTestBase {
}
/**
* Dataprovider for testInvalidCoreInstall().
* Data provider for testInvalidCoreInstall().
*/
public function providerTestInvalidCoreInstall() {
return [

View File

@ -22,7 +22,7 @@ class ZfExtensionManagerSfContainerTest extends TestCase {
*/
public function testGet() {
$service = new \stdClass();
$service->value = 'myvalue';
$service->value = 'my_value';
$container = new ContainerBuilder();
$container->set('foo', $service);
$bridge = new ZfExtensionManagerSfContainer();
@ -42,7 +42,7 @@ class ZfExtensionManagerSfContainerTest extends TestCase {
*/
public function testHas() {
$service = new \stdClass();
$service->value = 'myvalue';
$service->value = 'my_value';
$container = new ContainerBuilder();
$container->set('foo', $service);
$bridge = new ZfExtensionManagerSfContainer();
@ -84,7 +84,7 @@ class ZfExtensionManagerSfContainerTest extends TestCase {
*/
public function testPrefix() {
$service = new \stdClass();
$service->value = 'myvalue';
$service->value = 'my_value';
$container = new ContainerBuilder();
$container->set('foo.bar', $service);
$bridge = new ZfExtensionManagerSfContainer('foo.');
@ -100,7 +100,7 @@ class ZfExtensionManagerSfContainerTest extends TestCase {
*/
public function testCanonicalizeName($name, $canonical_name) {
$service = new \stdClass();
$service->value = 'myvalue';
$service->value = 'my_value';
$container = new ContainerBuilder();
$container->set($canonical_name, $service);
$bridge = new ZfExtensionManagerSfContainer();

View File

@ -35,7 +35,7 @@ class UuidTest extends TestCase {
}
/**
* Dataprovider for UUID instance tests.
* Data provider for UUID instance tests.
*
* @return array
*/
@ -74,7 +74,7 @@ class UuidTest extends TestCase {
}
/**
* Dataprovider for UUID instance tests.
* Data provider for UUID instance tests.
*
* @return array
* An array of arrays containing

View File

@ -170,10 +170,10 @@ class AssertLegacyTraitTest extends UnitTestCase {
$option_field->hasAttribute('selected')->willReturn(TRUE);
$this->webAssert
->optionExists('myselect', 'two')
->optionExists('my_select', 'two')
->willReturn($option_field->reveal());
$this->assertOptionSelected('myselect', 'two');
$this->assertOptionSelected('my_select', 'two');
}
/**
@ -185,11 +185,11 @@ class AssertLegacyTraitTest extends UnitTestCase {
$option_field->hasAttribute('selected')->willReturn(FALSE);
$this->webAssert
->optionExists('myselect', 'two')
->optionExists('my_select', 'two')
->willReturn($option_field->reveal());
$this->expectException(ExpectationFailedException::class);
$this->assertOptionSelected('myselect', 'two');
$this->assertOptionSelected('my_select', 'two');
}
/**

View File

@ -80,14 +80,14 @@ class LibraryDiscoveryTest extends UnitTestCase {
* @covers ::getLibrariesByExtension
*/
public function testGetLibrariesByExtension() {
$this->libraryDiscovery->getLibrariesbyExtension('test');
$this->libraryDiscovery->getLibrariesByExtension('test');
// Verify that subsequent calls don't trigger hook_library_info_alter()
// and hook_js_settings_alter() invocations, nor do they talk to the
// collector again. This ensures that the alterations made by
// hook_library_info_alter() and hook_js_settings_alter() implementations
// are statically cached, as desired.
$this->libraryDiscovery->getLibraryByName('test', 'test_1');
$this->libraryDiscovery->getLibrariesbyExtension('test');
$this->libraryDiscovery->getLibrariesByExtension('test');
}
/**

View File

@ -19,7 +19,7 @@ use Drupal\Tests\UnitTestCase;
class ConnectionTest extends UnitTestCase {
/**
* Dataprovider for testPrefixRoundTrip().
* Data provider for testPrefixRoundTrip().
*
* @return array
* Array of arrays with the following elements:
@ -68,7 +68,7 @@ class ConnectionTest extends UnitTestCase {
}
/**
* Dataprovider for testPrefixTables().
* Data provider for testPrefixTables().
*
* @return array
* Array of arrays with the following elements:
@ -117,7 +117,7 @@ class ConnectionTest extends UnitTestCase {
}
/**
* Dataprovider for testGetDriverClass().
* Data provider for testGetDriverClass().
*
* @return array
* Array of arrays with the following elements:
@ -290,7 +290,7 @@ class ConnectionTest extends UnitTestCase {
}
/**
* Dataprovider for testSchema().
* Data provider for testSchema().
*
* @return array
* Array of arrays with the following elements:
@ -366,7 +366,7 @@ class ConnectionTest extends UnitTestCase {
}
/**
* Dataprovider for testMakeComments().
* Data provider for testMakeComments().
*
* @return array
* Array of arrays with the following elements:
@ -402,7 +402,7 @@ class ConnectionTest extends UnitTestCase {
}
/**
* Dataprovider for testFilterComments().
* Data provider for testFilterComments().
*
* @return array
* Array of arrays with the following elements:
@ -644,7 +644,7 @@ class ConnectionTest extends UnitTestCase {
}
/**
* Dataprovider for testQueryTrim().
* Data provider for testQueryTrim().
*
* @return array
* Array of arrays with the following elements:

View File

@ -47,7 +47,7 @@ class InstallerObjectTest extends UnitTestCase {
}
/**
* Dataprovider for testDbUrltoConnectionConversion().
* Data provider for testDbUrlToConnectionConversion().
*
* @return array
* Array of arrays with the following elements:

View File

@ -48,13 +48,13 @@ class UrlConversionTest extends UnitTestCase {
*
* @dataProvider providerConvertDbUrlToConnectionInfo
*/
public function testDbUrltoConnectionConversion($root, $url, $database_array) {
public function testDbUrlToConnectionConversion($root, $url, $database_array) {
$result = Database::convertDbUrlToConnectionInfo($url, $root ?: $this->root);
$this->assertEquals($database_array, $result);
}
/**
* Dataprovider for testDbUrltoConnectionConversion().
* Data provider for testDbUrlToConnectionConversion().
*
* @return array
* Array of arrays with the following elements:
@ -216,7 +216,7 @@ class UrlConversionTest extends UnitTestCase {
}
/**
* Dataprovider for testGetInvalidArgumentExceptionInUrlConversion().
* Data provider for testGetInvalidArgumentExceptionInUrlConversion().
*
* @return array
* Array of arrays with the following elements:
@ -248,7 +248,7 @@ class UrlConversionTest extends UnitTestCase {
}
/**
* Dataprovider for testGetConnectionInfoAsUrl().
* Data provider for testGetConnectionInfoAsUrl().
*
* @return array
* Array of arrays with the following elements:
@ -376,7 +376,7 @@ class UrlConversionTest extends UnitTestCase {
}
/**
* Dataprovider for testGetInvalidArgumentGetConnectionInfoAsUrl().
* Data provider for testGetInvalidArgumentGetConnectionInfoAsUrl().
*
* @return array
* Array of arrays with the following elements:

View File

@ -78,7 +78,7 @@ class ActiveLinkResponseFilterTest extends UnitTestCase {
// Situations with context: front page, English, no query.
$context = [
'path' => 'myfrontpage',
'path' => 'my-front-page',
'front' => TRUE,
'language' => 'en',
'query' => [],
@ -87,7 +87,7 @@ class ActiveLinkResponseFilterTest extends UnitTestCase {
$situations[] = ['context' => $context, 'is active' => FALSE, 'attributes' => []];
// Matching path, plus all matching variations.
$attributes = [
'data-drupal-link-system-path' => 'myfrontpage',
'data-drupal-link-system-path' => 'my-front-page',
];
$situations[] = ['context' => $context, 'is active' => TRUE, 'attributes' => $attributes];
$situations[] = ['context' => $context, 'is active' => TRUE, 'attributes' => $attributes + ['hreflang' => 'en']];
@ -217,7 +217,7 @@ class ActiveLinkResponseFilterTest extends UnitTestCase {
// Situations with context: front page, English, query.
$context = [
'path' => 'myfrontpage',
'path' => 'my-front-page',
'front' => TRUE,
'language' => 'en',
'query' => ['foo' => 'bar'],
@ -225,7 +225,7 @@ class ActiveLinkResponseFilterTest extends UnitTestCase {
$situations[] = ['context' => $context, 'is active' => FALSE, 'attributes' => []];
// Matching path, plus all matching variations.
$attributes = [
'data-drupal-link-system-path' => 'myfrontpage',
'data-drupal-link-system-path' => 'my-front-page',
'data-drupal-link-query' => Json::encode(['foo' => 'bar']),
];
$situations[] = ['context' => $context, 'is active' => TRUE, 'attributes' => $attributes];
@ -254,13 +254,13 @@ class ActiveLinkResponseFilterTest extends UnitTestCase {
// Query with unsorted keys must match when the attribute is in sorted form.
$context = [
'path' => 'myfrontpage',
'path' => 'my-front-page',
'front' => TRUE,
'language' => 'en',
'query' => ['foo' => 'bar', 'baz' => 'qux'],
];
$attributes = [
'data-drupal-link-system-path' => 'myfrontpage',
'data-drupal-link-system-path' => 'my-front-page',
'data-drupal-link-query' => Json::encode(['baz' => 'qux', 'foo' => 'bar']),
];
$situations[] = ['context' => $context, 'is active' => TRUE, 'attributes' => $attributes];
@ -329,11 +329,11 @@ class ActiveLinkResponseFilterTest extends UnitTestCase {
// - the special matching path ('<front>')
$front_special_link = '<a data-drupal-link-system-path="&lt;front&gt;">Front</a>';
$front_special_link_active = '<a data-drupal-link-system-path="&lt;front&gt;" class="is-active">Front</a>';
$front_path_link = '<a data-drupal-link-system-path="myfrontpage">Front Path</a>';
$front_path_link_active = '<a data-drupal-link-system-path="myfrontpage" class="is-active">Front Path</a>';
$front_path_link = '<a data-drupal-link-system-path="my-front-page">Front Path</a>';
$front_path_link_active = '<a data-drupal-link-system-path="my-front-page" class="is-active">Front Path</a>';
$data[] = [
0 => $front_path_link . ' ' . $front_special_link,
1 => 'myfrontpage',
1 => 'my-front-page',
2 => TRUE,
3 => 'en',
4 => [],
@ -341,7 +341,7 @@ class ActiveLinkResponseFilterTest extends UnitTestCase {
];
$data[] = [
0 => $front_special_link . ' ' . $front_path_link,
1 => 'myfrontpage',
1 => 'my-front-page',
2 => TRUE,
3 => 'en',
4 => [],
@ -350,11 +350,11 @@ class ActiveLinkResponseFilterTest extends UnitTestCase {
// Test cases to verify that links to the front page do not get the
// 'is-active' class when not on the front page.
$other_link = '<a data-drupal-link-system-path="otherpage">Other page</a>';
$other_link_active = '<a data-drupal-link-system-path="otherpage" class="is-active">Other page</a>';
$other_link = '<a data-drupal-link-system-path="other-page">Other page</a>';
$other_link_active = '<a data-drupal-link-system-path="other-page" class="is-active">Other page</a>';
$data['<front>-and-other-link-on-other-path'] = [
0 => $front_special_link . ' ' . $other_link,
1 => 'otherpage',
1 => 'other-page',
2 => FALSE,
3 => 'en',
4 => [],
@ -362,7 +362,7 @@ class ActiveLinkResponseFilterTest extends UnitTestCase {
];
$data['front-and-other-link-on-other-path'] = [
0 => $front_path_link . ' ' . $other_link,
1 => 'otherpage',
1 => 'other-page',
2 => FALSE,
3 => 'en',
4 => [],
@ -370,7 +370,7 @@ class ActiveLinkResponseFilterTest extends UnitTestCase {
];
$data['other-and-<front>-link-on-other-path'] = [
0 => $other_link . ' ' . $front_special_link,
1 => 'otherpage',
1 => 'other-page',
2 => FALSE,
3 => 'en',
4 => [],
@ -378,7 +378,7 @@ class ActiveLinkResponseFilterTest extends UnitTestCase {
];
$data['other-and-front-link-on-other-path'] = [
0 => $other_link . ' ' . $front_path_link,
1 => 'otherpage',
1 => 'other-page',
2 => FALSE,
3 => 'en',
4 => [],
@ -435,7 +435,7 @@ class ActiveLinkResponseFilterTest extends UnitTestCase {
);
// A link that might otherwise be set 'active'.
$content = '<a data-drupal-link-system-path="otherpage">Other page</a>';
$content = '<a data-drupal-link-system-path="other-page">Other page</a>';
// Assert response with non-html content type gets ignored.
$response = new Response();

View File

@ -47,7 +47,7 @@ class ExtensionDiscoveryTest extends UnitTestCase {
}
if ($type === 'profile') {
// Set profile directories for discovery of the other extension types.
$extension_discovery->setProfileDirectories(['myprofile' => 'profiles/myprofile']);
$extension_discovery->setProfileDirectories(['my_profile' => 'profiles/my_profile']);
}
}
@ -119,15 +119,15 @@ class ExtensionDiscoveryTest extends UnitTestCase {
'sites/default/profiles/minimal/minimal.info.yml' => [
'type' => 'profile',
],
'profiles/myprofile/myprofile.info.yml' => [
'profiles/my_profile/my_profile.info.yml' => [
'type' => 'profile',
],
'profiles/myprofile/modules/myprofile_nested_module/myprofile_nested_module.info.yml' => [],
'profiles/otherprofile/otherprofile.info.yml' => [
'profiles/my_profile/modules/my_profile_nested_module/my_profile_nested_module.info.yml' => [],
'profiles/other_profile/other_profile.info.yml' => [
'type' => 'profile',
],
'core/modules/user/user.info.yml' => [],
'profiles/otherprofile/modules/otherprofile_nested_module/otherprofile_nested_module.info.yml' => [],
'profiles/other_profile/modules/other_profile_nested_module/other_profile_nested_module.info.yml' => [],
'core/modules/system/system.info.yml' => [],
'core/themes/seven/seven.info.yml' => [
'type' => 'theme',
@ -167,7 +167,7 @@ class ExtensionDiscoveryTest extends UnitTestCase {
$this->addFileToFilesystemStructure($filesystem_structure, $pieces, $content);
}
unset($files_by_type_and_name_expected['module']['otherprofile_nested_module']);
unset($files_by_type_and_name_expected['module']['other_profile_nested_module']);
return $files_by_type_and_name_expected;
}

View File

@ -334,7 +334,7 @@ CORE_8X;
}
/**
* Dataprovider for testCore8x().
* Data provider for testCore8x().
*/
public function providerCore8x() {
return [
@ -444,7 +444,7 @@ INVALID_CORE_VERSION_REQUIREMENT;
}
/**
* Dataprovider for testCoreVersionRequirementInvalid().
* Data provider for testCoreVersionRequirementInvalid().
*/
public function providerCoreVersionRequirementInvalid() {
return [
@ -583,7 +583,7 @@ CORE_INCOMPATIBILITY;
}
/**
* Dataprovider for testCoreIncompatibility().
* Data provider for testCoreIncompatibility().
*/
public function providerCoreIncompatibility() {
list($major, $minor) = explode('.', \Drupal::VERSION);

View File

@ -182,7 +182,7 @@ class FormStateDecoratorBaseTest extends UnitTestCase {
*/
public function testSetExecuted() {
$this->decoratedFormState->setExecuted()
->shouldBecalled();
->shouldBeCalled();
$this->assertSame($this->formStateDecoratorBase, $this->formStateDecoratorBase->setExecuted());
}
@ -277,7 +277,7 @@ class FormStateDecoratorBaseTest extends UnitTestCase {
*/
public function testSetLimitValidationErrors($limit_validation_errors) {
$this->decoratedFormState->setLimitValidationErrors($limit_validation_errors)
->shouldBecalled();
->shouldBeCalled();
$this->assertSame($this->formStateDecoratorBase, $this->formStateDecoratorBase->setLimitValidationErrors($limit_validation_errors));
}
@ -323,7 +323,7 @@ class FormStateDecoratorBaseTest extends UnitTestCase {
*/
public function testSetMethod($method) {
$this->decoratedFormState->setMethod($method)
->shouldBecalled();
->shouldBeCalled();
$this->assertSame($this->formStateDecoratorBase, $this->formStateDecoratorBase->setMethod($method));
}
@ -340,7 +340,7 @@ class FormStateDecoratorBaseTest extends UnitTestCase {
public function testIsMethodType($expected_return_value, $method_type) {
$this->decoratedFormState->isMethodType($method_type)
->willReturn($expected_return_value)
->shouldBecalled();
->shouldBeCalled();
$this->assertSame($expected_return_value, $this->formStateDecoratorBase->isMethodType($method_type));
}
@ -405,7 +405,7 @@ class FormStateDecoratorBaseTest extends UnitTestCase {
public function testIsValidationEnforced($must_validate) {
$this->decoratedFormState->isValidationEnforced()
->willReturn($must_validate)
->shouldBecalled();
->shouldBeCalled();
$this->assertSame($must_validate, $this->formStateDecoratorBase->isValidationEnforced());
}
@ -463,7 +463,7 @@ class FormStateDecoratorBaseTest extends UnitTestCase {
public function testIsProcessingInput($process_input) {
$this->decoratedFormState->isProcessingInput()
->willReturn($process_input)
->shouldBecalled();
->shouldBeCalled();
$this->assertSame($process_input, $this->formStateDecoratorBase->isProcessingInput());
}
@ -477,7 +477,7 @@ class FormStateDecoratorBaseTest extends UnitTestCase {
*/
public function testSetProgrammed($programmed) {
$this->decoratedFormState->setProgrammed($programmed)
->shouldBecalled();
->shouldBeCalled();
$this->assertSame($this->formStateDecoratorBase, $this->formStateDecoratorBase->setProgrammed($programmed));
}
@ -492,7 +492,7 @@ class FormStateDecoratorBaseTest extends UnitTestCase {
public function testIsProgrammed($programmed) {
$this->decoratedFormState->isProgrammed()
->willReturn($programmed)
->shouldBecalled();
->shouldBeCalled();
$this->assertSame($programmed, $this->formStateDecoratorBase->isProgrammed());
}
@ -506,7 +506,7 @@ class FormStateDecoratorBaseTest extends UnitTestCase {
*/
public function testSetProgrammedBypassAccessCheck($programmed_bypass_access_check) {
$this->decoratedFormState->setProgrammedBypassAccessCheck($programmed_bypass_access_check)
->shouldBecalled();
->shouldBeCalled();
$this->assertSame($this->formStateDecoratorBase, $this->formStateDecoratorBase->setProgrammedBypassAccessCheck($programmed_bypass_access_check));
}
@ -824,7 +824,7 @@ class FormStateDecoratorBaseTest extends UnitTestCase {
$this->decoratedFormState->getValidateHandlers()
->willReturn($validate_handlers)
->shouldBecalled();
->shouldBeCalled();
$this->assertSame($validate_handlers, $this->formStateDecoratorBase->getValidateHandlers());
}

View File

@ -230,9 +230,9 @@ $databases = [];
* Sample Database configuration format for a driver in a contributed module:
* @code
* $databases['default']['default'] = [
* 'driver' => 'mydriver',
* 'namespace' => 'Drupal\mymodule\Driver\Database\mydriver',
* 'autoload' => 'modules/mymodule/src/Driver/Database/mydriver/',
* 'driver' => 'my_driver',
* 'namespace' => 'Drupal\my_module\Driver\Database\my_driver',
* 'autoload' => 'modules/my_module/src/Driver/Database/my_driver/',
* 'database' => 'databasename',
* 'username' => 'sqlusername',
* 'password' => 'sqlpassword',