Daniel Supernault 2 yıl önce
ebeveyn
işleme
d4f92da0e5
1 değiştirilmiş dosya ile 6 ekleme ve 6 silme
  1. 6 6
      tests/Unit/Lexer/StatusLexerTest.php

+ 6 - 6
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);
     }
 }