diff --git a/src/Illuminate/Foundation/Testing/DatabaseTruncation.php b/src/Illuminate/Foundation/Testing/DatabaseTruncation.php index 4c37f5a6b051..2bf71fc8c2df 100644 --- a/src/Illuminate/Foundation/Testing/DatabaseTruncation.php +++ b/src/Illuminate/Foundation/Testing/DatabaseTruncation.php @@ -107,7 +107,7 @@ protected function withoutTablePrefix(ConnectionInterface $connection, string $t { $prefix = $connection->getTablePrefix(); - return strpos($table, $prefix) === 0 + return str_starts_with($table, $prefix) ? substr($table, strlen($prefix)) : $table; } diff --git a/tests/Integration/Database/MySql/JoinLateralTest.php b/tests/Integration/Database/MySql/JoinLateralTest.php index 29770adf97ba..2dce04b8f5d0 100644 --- a/tests/Integration/Database/MySql/JoinLateralTest.php +++ b/tests/Integration/Database/MySql/JoinLateralTest.php @@ -56,7 +56,7 @@ protected function checkMySqlVersion() { $mySqlVersion = DB::select('select version()')[0]->{'version()'} ?? ''; - if (strpos($mySqlVersion, 'Maria') !== false) { + if (str_contains($mySqlVersion, 'Maria')) { $this->markTestSkipped('Lateral joins are not supported on MariaDB'.__CLASS__); } elseif ((float) $mySqlVersion < '8.0.14') { $this->markTestSkipped('Lateral joins are not supported on MySQL < 8.0.14'.__CLASS__); diff --git a/tests/Mail/MailSesTransportTest.php b/tests/Mail/MailSesTransportTest.php index f8358cebcc25..13466464a261 100755 --- a/tests/Mail/MailSesTransportTest.php +++ b/tests/Mail/MailSesTransportTest.php @@ -76,7 +76,7 @@ public function testSend() $arg['Destinations'] === ['me@example.com', 'you@example.com'] && $arg['ListManagementOptions'] === ['ContactListName' => 'TestList', 'TopicName' => 'TestTopic'] && $arg['Tags'] === [['Name' => 'FooTag', 'Value' => 'TagValue']] && - strpos($arg['RawMessage']['Data'], 'Reply-To: Taylor Otwell ') !== false; + str_contains($arg['RawMessage']['Data'], 'Reply-To: Taylor Otwell '); })) ->andReturn($sesResult); diff --git a/tests/Mail/MailSesV2TransportTest.php b/tests/Mail/MailSesV2TransportTest.php index 9f343d53c91e..1c22256e94cf 100755 --- a/tests/Mail/MailSesV2TransportTest.php +++ b/tests/Mail/MailSesV2TransportTest.php @@ -76,7 +76,7 @@ public function testSend() $arg['Destination']['ToAddresses'] === ['me@example.com', 'you@example.com'] && $arg['ListManagementOptions'] === ['ContactListName' => 'TestList', 'TopicName' => 'TestTopic'] && $arg['EmailTags'] === [['Name' => 'FooTag', 'Value' => 'TagValue']] && - strpos($arg['Content']['Raw']['Data'], 'Reply-To: Taylor Otwell ') !== false; + str_contains($arg['Content']['Raw']['Data'], 'Reply-To: Taylor Otwell '); })) ->andReturn($sesResult);