maxPackageSize = 5; expect(Text::input('abcdefgh', $connection)) ->toBe(0); }); //input without "\n" expect(Text::input('jhdxr', $connection)) ->toBe(0) //input with "\n" ->and(Text::input("jhdxr\n", $connection)) ->toBe(6) //::encode ->and(Text::encode('jhdxr')) ->toBe("jhdxr\n") //::decode ->and(Text::decode("jhdxr\n")) ->toBe('jhdxr'); });