status = "@pixelfed hi, really like the website! #píxelfed"; $this->entities = Extractor::create()->extract($this->status); $this->autolink = Autolink::create()->autolink($this->status); } public function testLexerExtractor() { $expected = [ "hashtags" => [ "píxelfed", ], "urls" => [], "mentions" => [ "pixelfed", ], "replyto" => "pixelfed", "hashtags_with_indices" => [ [ "hashtag" => "píxelfed", "indices" => [ 39, 48, ], ], ], "urls_with_indices" => [], "mentions_with_indices" => [ [ "screen_name" => "pixelfed", "indices" => [ 0, 9, ], ] ] ]; $this->assertEquals($this->entities, $expected); } public function testAutolink() { $expected = '@pixelfed hi, really like the website! #píxelfed'; $this->assertEquals($this->autolink, $expected); } }