spec\Fenos\Notifynder\Parsers\NotifynderParserSpec::it_will_parse_4_extra_params PHP Метод

it_will_parse_4_extra_params() публичный Метод

    public function it_will_parse_4_extra_params()
    {
        $extra = ['name' => 'fabri', 'username' => 'fenos', 'status' => 'active', 'prof' => 'dev'];
        $text = 'Hi {extra.name}, your username is: {extra.username} your status: {extra.status} your profession: {extra.prof}';
        $notification = ['body' => ['text' => $text], 'extra' => json_encode($extra)];
        $parsedText = "Hi {$extra['name']}, your username is: {$extra['username']} your status: {$extra['status']} your profession: {$extra['prof']}";
        $this->parse($notification)->shouldReturn($parsedText);
    }