Loading core/modules/ban/tests/src/Unit/BanMiddlewareTest.php +1 −1 Original line number Diff line number Diff line Loading @@ -78,7 +78,7 @@ public function testUnbannedIp() { $request = Request::create('/test-path'); $request->server->set('REMOTE_ADDR', $unbanned_ip); $expected_response = new Response(200); $expected_response = new Response(status: 200); $this->kernel->expects($this->once()) ->method('handle') ->with($request, HttpKernelInterface::MAIN_REQUEST, TRUE) Loading core/modules/migrate_drupal/tests/src/Unit/MigrationStateUnitTest.php +1 −1 Original line number Diff line number Diff line Loading @@ -48,7 +48,7 @@ public function testGetUpgradeStates($modules_to_enable, $files, $field_plugins, foreach ($files as $module => $contents) { $path = $url . '/' . $module . '/migrations/state'; mkdir($path, '0755', TRUE); mkdir($path, 0755, TRUE); file_put_contents($path . '/' . $module . '.migrate_drupal.yml', $contents); } $moduleHandler->getModuleDirectories() Loading core/modules/phpass/tests/src/Unit/PasswordVerifyTest.php +1 −1 Original line number Diff line number Diff line Loading @@ -149,7 +149,7 @@ public function providerLongPasswords() { // Check a string of 3-byte UTF-8 characters, 510 byte long password is // allowed. $len = floor(PasswordInterface::PASSWORD_MAX_LENGTH / 3); $len = (int) floor(PasswordInterface::PASSWORD_MAX_LENGTH / 3); $diff = PasswordInterface::PASSWORD_MAX_LENGTH % 3; $passwords['utf8'] = [str_repeat('€', $len), TRUE]; // 512 byte long password is allowed. Loading core/modules/update/tests/src/Unit/UpdateFetcherTest.php +3 −3 Original line number Diff line number Diff line Loading @@ -178,7 +178,7 @@ public function testUpdateFetcherNoFallback() { // First, try without the HTTP fallback setting, and HTTPS mocked to fail. $settings = new Settings([]); $this->mockClient( new Response('500', [], 'HTTPS failed'), new Response(500, [], 'HTTPS failed'), ); $update_fetcher = new UpdateFetcher($this->mockConfigFactory, $this->mockHttpClient, $settings, $this->logger); Loading Loading @@ -206,8 +206,8 @@ public function testUpdateFetcherNoFallback() { public function testUpdateFetcherHttpFallback() { $settings = new Settings(['update_fetch_with_http_fallback' => TRUE]); $this->mockClient( new Response('500', [], 'HTTPS failed'), new Response('200', [], 'HTTP worked'), new Response(500, [], 'HTTPS failed'), new Response(200, [], 'HTTP worked'), ); $update_fetcher = new UpdateFetcher($this->mockConfigFactory, $this->mockHttpClient, $settings, $this->logger); Loading core/tests/Drupal/Tests/Component/Datetime/DateTimePlusTest.php +4 −4 Original line number Diff line number Diff line Loading @@ -186,7 +186,7 @@ public function testDateTimestamp($input, array $initial, array $transform) { * * @param \Drupal\Component\Datetime\DateTimePlus $date * DateTimePlus to test. * @param string $input * @param string|int $input * The original input passed to the test method. * @param array $initial * @see testTimestamp() Loading @@ -195,7 +195,7 @@ public function testDateTimestamp($input, array $initial, array $transform) { * * @internal */ public function assertDateTimestamp(DateTimePlus $date, string $input, array $initial, array $transform): void { public function assertDateTimestamp(DateTimePlus $date, string|int $input, array $initial, array $transform): void { // Check format. $value = $date->format($initial['format']); $this->assertEquals($initial['expected_date'], $value, sprintf("Test new DateTimePlus(%s, %s): should be %s, found %s.", $input, $initial['timezone'], $initial['expected_date'], $value)); Loading Loading @@ -694,7 +694,7 @@ public function providerTestDateDiff() { ], [ 'input1' => DateTimePlus::createFromFormat('U', 3600), 'input2' => \DateTime::createFromFormat('U', 0), 'input2' => \DateTime::createFromFormat('U', '0'), 'absolute' => FALSE, 'expected' => $negative_1_hour, ], Loading @@ -706,7 +706,7 @@ public function providerTestDateDiff() { ], [ 'input1' => DateTimePlus::createFromFormat('U', 3600), 'input2' => \DateTime::createFromFormat('U', 0), 'input2' => \DateTime::createFromFormat('U', '0'), 'absolute' => TRUE, 'expected' => $positive_1_hour, ], Loading Loading
core/modules/ban/tests/src/Unit/BanMiddlewareTest.php +1 −1 Original line number Diff line number Diff line Loading @@ -78,7 +78,7 @@ public function testUnbannedIp() { $request = Request::create('/test-path'); $request->server->set('REMOTE_ADDR', $unbanned_ip); $expected_response = new Response(200); $expected_response = new Response(status: 200); $this->kernel->expects($this->once()) ->method('handle') ->with($request, HttpKernelInterface::MAIN_REQUEST, TRUE) Loading
core/modules/migrate_drupal/tests/src/Unit/MigrationStateUnitTest.php +1 −1 Original line number Diff line number Diff line Loading @@ -48,7 +48,7 @@ public function testGetUpgradeStates($modules_to_enable, $files, $field_plugins, foreach ($files as $module => $contents) { $path = $url . '/' . $module . '/migrations/state'; mkdir($path, '0755', TRUE); mkdir($path, 0755, TRUE); file_put_contents($path . '/' . $module . '.migrate_drupal.yml', $contents); } $moduleHandler->getModuleDirectories() Loading
core/modules/phpass/tests/src/Unit/PasswordVerifyTest.php +1 −1 Original line number Diff line number Diff line Loading @@ -149,7 +149,7 @@ public function providerLongPasswords() { // Check a string of 3-byte UTF-8 characters, 510 byte long password is // allowed. $len = floor(PasswordInterface::PASSWORD_MAX_LENGTH / 3); $len = (int) floor(PasswordInterface::PASSWORD_MAX_LENGTH / 3); $diff = PasswordInterface::PASSWORD_MAX_LENGTH % 3; $passwords['utf8'] = [str_repeat('€', $len), TRUE]; // 512 byte long password is allowed. Loading
core/modules/update/tests/src/Unit/UpdateFetcherTest.php +3 −3 Original line number Diff line number Diff line Loading @@ -178,7 +178,7 @@ public function testUpdateFetcherNoFallback() { // First, try without the HTTP fallback setting, and HTTPS mocked to fail. $settings = new Settings([]); $this->mockClient( new Response('500', [], 'HTTPS failed'), new Response(500, [], 'HTTPS failed'), ); $update_fetcher = new UpdateFetcher($this->mockConfigFactory, $this->mockHttpClient, $settings, $this->logger); Loading Loading @@ -206,8 +206,8 @@ public function testUpdateFetcherNoFallback() { public function testUpdateFetcherHttpFallback() { $settings = new Settings(['update_fetch_with_http_fallback' => TRUE]); $this->mockClient( new Response('500', [], 'HTTPS failed'), new Response('200', [], 'HTTP worked'), new Response(500, [], 'HTTPS failed'), new Response(200, [], 'HTTP worked'), ); $update_fetcher = new UpdateFetcher($this->mockConfigFactory, $this->mockHttpClient, $settings, $this->logger); Loading
core/tests/Drupal/Tests/Component/Datetime/DateTimePlusTest.php +4 −4 Original line number Diff line number Diff line Loading @@ -186,7 +186,7 @@ public function testDateTimestamp($input, array $initial, array $transform) { * * @param \Drupal\Component\Datetime\DateTimePlus $date * DateTimePlus to test. * @param string $input * @param string|int $input * The original input passed to the test method. * @param array $initial * @see testTimestamp() Loading @@ -195,7 +195,7 @@ public function testDateTimestamp($input, array $initial, array $transform) { * * @internal */ public function assertDateTimestamp(DateTimePlus $date, string $input, array $initial, array $transform): void { public function assertDateTimestamp(DateTimePlus $date, string|int $input, array $initial, array $transform): void { // Check format. $value = $date->format($initial['format']); $this->assertEquals($initial['expected_date'], $value, sprintf("Test new DateTimePlus(%s, %s): should be %s, found %s.", $input, $initial['timezone'], $initial['expected_date'], $value)); Loading Loading @@ -694,7 +694,7 @@ public function providerTestDateDiff() { ], [ 'input1' => DateTimePlus::createFromFormat('U', 3600), 'input2' => \DateTime::createFromFormat('U', 0), 'input2' => \DateTime::createFromFormat('U', '0'), 'absolute' => FALSE, 'expected' => $negative_1_hour, ], Loading @@ -706,7 +706,7 @@ public function providerTestDateDiff() { ], [ 'input1' => DateTimePlus::createFromFormat('U', 3600), 'input2' => \DateTime::createFromFormat('U', 0), 'input2' => \DateTime::createFromFormat('U', '0'), 'absolute' => TRUE, 'expected' => $positive_1_hour, ], Loading