Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个文件上传应用程序。我想测试我的Upload控制器。为此,我如何将文件传递给我的测试?对于我的应用程序中的文件上传,我使用外部应用程序/插件(Flash/HTML5/HTML4)。
Upload
不知何故像这样:
use Test::Mojo; my $t = Test::Mojo->new('MyApp'); $t->post_form_ok('/my_action', {my_upload => {file => '/path/to/file'}});