+ public function test_indexing_works_as_expected_for_page_with_lots_of_terms()
+ {
+ $this->markTestSkipped('Time consuming test');
+
+ $count = 100000;
+ $text = '';
+ $chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_#';
+ for ($i = 0; $i < $count; $i++) {
+ $text .= substr(str_shuffle($chars), 0, 5) . ' ';
+ }
+
+ $page = $this->entities->newPage(['name' => 'Test page A', 'html' => '<p>' . $text . '</p>']);
+
+ $termCount = $page->searchTerms()->count();
+
+ // Expect at least 90% unique rate
+ $this->assertGreaterThan($count * 0.9, $termCount);
+ }
+