composer update

This commit is contained in:
Oliver Davies 2019-01-24 08:00:03 +00:00
parent f6abc3dce2
commit 71dfaca858
1753 changed files with 45274 additions and 14619 deletions

View file

@ -2,6 +2,7 @@
namespace Drupal\FunctionalTests\Bootstrap;
use Drupal\Component\Render\FormattableMarkup;
use Drupal\Tests\BrowserTestBase;
/**
@ -37,7 +38,7 @@ class UncaughtExceptionTest extends BrowserTestBase {
*
* @var array
*/
public static $modules = ['error_service_test'];
public static $modules = ['error_service_test', 'error_test'];
/**
* {@inheritdoc}
@ -99,6 +100,31 @@ class UncaughtExceptionTest extends BrowserTestBase {
$this->assertErrorLogged($this->expectedExceptionMessage);
}
/**
* Tests displaying an uncaught fatal error.
*/
public function testUncaughtFatalError() {
$fatal_error = [
'%type' => 'Recoverable fatal error',
'@message' => 'Argument 1 passed to Drupal\error_test\Controller\ErrorTestController::Drupal\error_test\Controller\{closure}() must be of the type array, string given, called in ' . \Drupal::root() . '/core/modules/system/tests/modules/error_test/src/Controller/ErrorTestController.php on line 62 and defined',
'%function' => 'Drupal\error_test\Controller\ErrorTestController->Drupal\error_test\Controller\{closure}()',
];
if (version_compare(PHP_VERSION, '7.0.0-dev') >= 0) {
// In PHP 7, instead of a recoverable fatal error we get a TypeError.
$fatal_error['%type'] = 'TypeError';
// The error message also changes in PHP 7.
$fatal_error['@message'] = 'Argument 1 passed to Drupal\error_test\Controller\ErrorTestController::Drupal\error_test\Controller\{closure}() must be of the type array, string given, called in ' . \Drupal::root() . '/core/modules/system/tests/modules/error_test/src/Controller/ErrorTestController.php on line 62';
}
$this->drupalGet('error-test/generate-fatals');
$this->assertResponse(500, 'Received expected HTTP status code.');
$message = new FormattableMarkup('%type: @message in %function (line ', $fatal_error);
$this->assertRaw((string) $message);
$this->assertRaw('<pre class="backtrace">');
// Ensure we are escaping but not double escaping.
$this->assertRaw('&#039;');
$this->assertNoRaw('&amp;#039;');
}
/**
* Tests uncaught exception handling with custom exception handler.
*/

View file

@ -114,6 +114,7 @@ class BrowserTestBaseTest extends BrowserTestBase {
// Test drupalPostForm().
$edit = ['bananas' => 'red'];
// Submit the form using the button label.
$result = $this->drupalPostForm('form-test/object-builder', $edit, 'Save');
$this->assertSame($this->getSession()->getPage()->getContent(), $result);
$value = $config_factory->get('form_test.object')->get('bananas');
@ -123,6 +124,20 @@ class BrowserTestBaseTest extends BrowserTestBase {
$value = $config_factory->get('form_test.object')->get('bananas');
$this->assertSame('', $value);
// Submit the form using the button id.
$edit = ['bananas' => 'blue'];
$result = $this->drupalPostForm('form-test/object-builder', $edit, 'edit-submit');
$this->assertSame($this->getSession()->getPage()->getContent(), $result);
$value = $config_factory->get('form_test.object')->get('bananas');
$this->assertSame('blue', $value);
// Submit the form using the button name.
$edit = ['bananas' => 'purple'];
$result = $this->drupalPostForm('form-test/object-builder', $edit, 'op');
$this->assertSame($this->getSession()->getPage()->getContent(), $result);
$value = $config_factory->get('form_test.object')->get('bananas');
$this->assertSame('purple', $value);
// Test drupalPostForm() with no-html response.
$values = Json::decode($this->drupalPostForm('form_test/form-state-values-clean', [], t('Submit')));
$this->assertTrue(1000, $values['beer']);

View file

@ -19,7 +19,7 @@ class InstallerDatabaseErrorMessagesTest extends InstallerTestBase {
// it will try and create the drupal_install_test table as this is part of
// the standard database tests performed by the installer in
// Drupal\Core\Database\Install\Tasks.
Database::getConnection('default')->query('CREATE TABLE {drupal_install_test} (id int NULL)');
Database::getConnection('default')->query('CREATE TABLE {drupal_install_test} (id int NOT NULL PRIMARY KEY)');
parent::setUpSettings();
}

View file

@ -48,12 +48,12 @@ class InstallerTranslationTest extends InstallerTestBase {
// it will try and create the drupal_install_test table as this is part of
// the standard database tests performed by the installer in
// Drupal\Core\Database\Install\Tasks.
Database::getConnection('default')->query('CREATE TABLE {drupal_install_test} (id int NULL)');
Database::getConnection('default')->query('CREATE TABLE {drupal_install_test} (id int NOT NULL PRIMARY KEY)');
parent::setUpSettings();
// Ensure that the error message translation is working.
$this->assertRaw('Beheben Sie alle Probleme unten, um die Installation fortzusetzen. Informationen zur Konfiguration der Datenbankserver finden Sie in der <a href="https://www.drupal.org/getting-started/install">Installationshandbuch</a>, oder kontaktieren Sie Ihren Hosting-Anbieter.');
$this->assertRaw('<strong>CREATE</strong> ein Test-Tabelle auf Ihrem Datenbankserver mit dem Befehl <em class="placeholder">CREATE TABLE {drupal_install_test} (id int NULL)</em> fehlgeschlagen.');
$this->assertRaw('<strong>CREATE</strong> ein Test-Tabelle auf Ihrem Datenbankserver mit dem Befehl <em class="placeholder">CREATE TABLE {drupal_install_test} (id int NOT NULL PRIMARY KEY)</em> fehlgeschlagen.');
// Now do it successfully.
Database::getConnection('default')->query('DROP TABLE {drupal_install_test}');