From d4f92da0e59d28218c28e50c485b34b58bdf15be Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Sat, 27 May 2023 07:27:35 -0600 Subject: [PATCH] Fix test --- tests/Unit/Lexer/StatusLexerTest.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/Unit/Lexer/StatusLexerTest.php b/tests/Unit/Lexer/StatusLexerTest.php index caaedd8ed..f1b19a4c5 100644 --- a/tests/Unit/Lexer/StatusLexerTest.php +++ b/tests/Unit/Lexer/StatusLexerTest.php @@ -109,31 +109,31 @@ class StatusLexerTest extends TestCase /** @test * */ public function mentionLimit() { - $text = '@test1 @test @test2 @test3 @test4 @test5 test post'; + $text = '@test1 @test @test2 @test3 @test4 @test5 @test6 @test7 @test8 @test9 @test10 @test11 @test12 @test13 @test14 @test15 @test16 @test17 @test18 @test19 test post'; $entities = Extractor::create()->extract($text); $count = count($entities['mentions']); - $this->assertEquals($count, Status::MAX_MENTIONS); + $this->assertEquals(Status::MAX_MENTIONS, $count); } /** @test * */ public function hashtagLimit() { - $text = '#hashtag0 #hashtag1 #hashtag2 #hashtag3 #hashtag4 #hashtag5 #hashtag6 #hashtag7 #hashtag8 #hashtag9 #hashtag10 #hashtag11 #hashtag12 #hashtag13 #hashtag14 #hashtag15 #hashtag16 #hashtag17 #hashtag18 #hashtag19 #hashtag20 #hashtag21 #hashtag22 #hashtag23 #hashtag24 #hashtag25 #hashtag26 #hashtag27 #hashtag28 #hashtag29 #hashtag30 #hashtag31'; + $text = '#hashtag0 #hashtag1 #hashtag2 #hashtag3 #hashtag4 #hashtag5 #hashtag6 #hashtag7 #hashtag8 #hashtag9 #hashtag10 #hashtag11 #hashtag12 #hashtag13 #hashtag14 #hashtag15 #hashtag16 #hashtag17 #hashtag18 #hashtag19 #hashtag20 #hashtag21 #hashtag22 #hashtag23 #hashtag24 #hashtag25 #hashtag26 #hashtag27 #hashtag28 #hashtag29 #hashtag30 #hashtag31 #hashtag0 #hashtag1 #hashtag2 #hashtag3 #hashtag4 #hashtag5 #hashtag6 #hashtag7 #hashtag8 #hashtag9 #hashtag10 #hashtag11 #hashtag12 #hashtag13 #hashtag14 #hashtag15 #hashtag16 #hashtag17 #hashtag18 #hashtag19 #hashtag20 #hashtag21 #hashtag22 #hashtag23 #hashtag24 #hashtag25 #hashtag26 #hashtag27 #hashtag28 #hashtag29 #hashtag30 #hashtag31'; $entities = Extractor::create()->extract($text); $count = count($entities['hashtags']); - $this->assertEquals($count, Status::MAX_HASHTAGS); + $this->assertEquals(Status::MAX_HASHTAGS, $count); } /** @test * */ public function linkLimit() { - $text = 'https://example.org https://example.net https://example.com'; + $text = 'https://example.org https://example.net https://example.com https://example.com https://example.net'; $entities = Extractor::create()->extract($text); $count = count($entities['urls']); - $this->assertEquals($count, Status::MAX_LINKS); + $this->assertEquals(Status::MAX_LINKS, $count); } }