diff options
Diffstat (limited to 'tests_integration/DefineHandlerTest.php')
| -rw-r--r-- | tests_integration/DefineHandlerTest.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests_integration/DefineHandlerTest.php b/tests_integration/DefineHandlerTest.php index 6dcce49..c695f6b 100644 --- a/tests_integration/DefineHandlerTest.php +++ b/tests_integration/DefineHandlerTest.php @@ -41,7 +41,7 @@ final class DefineHandlerTest extends ApiTestCase $this->assertArrayHasKey('result', $body); // Either disabled message or definitions $isDisabled = isset($body['result'][0]) && $body['result'][0] === 'Dictionary lookups are disabled.'; - $isDefined = isset($body['result'][0]) && str_contains($body['result'][0], '<strong>'); + $isDefined = isset($body['result'][0]) && str_contains($body['result'][0], 'cat:'); $this->assertTrue($isDisabled || $isDefined, 'Expected either disabled message or definitions'); } @@ -65,8 +65,8 @@ final class DefineHandlerTest extends ApiTestCase $this->assertEquals(200, $status); $this->assertArrayHasKey('result', $body); $this->assertNotEmpty($body['result']); - // First result should be the word with <strong> tags - $this->assertEquals('<strong>cat</strong>', $body['result'][0]); + // First result should be the word with : + $this->assertEquals('cat:', $body['result'][0]); // Followed by definition(s) $this->assertGreaterThan(1, count($body['result'])); } @@ -91,7 +91,7 @@ final class DefineHandlerTest extends ApiTestCase $this->assertArrayHasKey('result', $body); $this->assertNotEmpty($body['result']); // Should match "cat" definition - $this->assertEquals('<strong>cats</strong>', $body['result'][0]); + $this->assertEquals('cats:', $body['result'][0]); } public function test_define_returns_no_results_for_unknown_word(): void |
