Skip to content

Commit eb827e7

Browse files
committed
adjusted trait to handle the updated illuminate packages for testing
1 parent cdb865f commit eb827e7

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/Cmgmyr/Messenger/Traits/Messagable.php

+2-4
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,8 @@ public function threadsWithNewMessages()
5151
* I don't want to include as a dependency for this package...it's overkill. So let's
5252
* exclude this check in the testing environment.
5353
*/
54-
if (getenv('APP_ENV') != 'testing') {
55-
if (!str_contains(\Illuminate\Foundation\Application::VERSION, '5.0')) {
56-
$participants = $participants->all();
57-
}
54+
if (getenv('APP_ENV') == 'testing' || !str_contains(\Illuminate\Foundation\Application::VERSION, '5.0')) {
55+
$participants = $participants->all();
5856
}
5957

6058
if ($participants) {

0 commit comments

Comments
 (0)