You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
'Multisite Language Switcher: Collection for reference user has been truncated because it exceeded the maximum of %d users. Please, use the hook "msls_reference_users" to filter the result before!',
Copy file name to clipboardExpand all lines: tests/phpunit/TestMslsAdmin.php
+2-28Lines changed: 2 additions & 28 deletions
Original file line number
Diff line number
Diff line change
@@ -116,35 +116,9 @@ public function test_admin_display(): void {
116
116
$obj->admin_display();
117
117
}
118
118
119
-
publicfunctiontest_reference_user(): void {
120
-
$users = array();
121
-
$too_much = MslsAdmin::MAX_REFERENCE_USERS + 1;
122
-
for ( $i = 1; $i <= $too_much; $i++ ) {
123
-
$users[] = (object) array(
124
-
'ID' => $i,
125
-
'user_nicename' => 'realloc',
126
-
);
127
-
}
128
-
129
-
$obj = $this->MslsAdminFactory( $users );
130
-
131
-
set_error_handler(
132
-
staticfunction ( $errno, $errstr ) {
133
-
restore_error_handler();
134
-
thrownew \Exception( $errstr, $errno );
135
-
},
136
-
E_ALL
137
-
);
138
-
139
-
$this->expectException( \Exception::class );
140
-
$this->expectExceptionMessage(
141
-
'Multisite Language Switcher: Collection for reference user has been truncated because it exceeded the maximum of 100 users. Please, use the hook "msls_reference_users" to filter the result before!'
0 commit comments