apiRoutesContainingAny(['message', 'contact', 'support', 'notification', 'student', 'parent', 'settings', 'certificate']); $text = "اختبار עברית café e\u{0301} \u{202E}evil.pdf 😬"; foreach (array_slice($routes, 0, 45) as $route) { $method = $this->primaryMethod($route); if (! in_array($method, ['POST', 'PUT', 'PATCH'], true)) { continue; } $response = $this->withHeader('Accept-Language', 'ar,en;q=0.7') ->requestAs($this->actorFor($route->uri()), $method, $route->uri(), $this->payloadFor($method, $route->uri()) + [ 'name' => $text, 'title' => $text, 'message' => $text, 'notes' => $text, 'description' => $text, ]); $this->assertControlled($response, $method, $route->uri()); $this->assertStringNotContainsString('malformed utf-8', strtolower($response->getContent())); } } }