I think Scott and Glen are both pointing out that your method in your controller class that is not associated with a route ("filter") is not a method of your controller, but instead in the "model" portion of MVC. It might help you to move that code outside of the controller class, and then it'll make much more sense to test it normally with Test::More instead of Test::Mojo.
# lib/App/Controller/This.pm
package App::Controller::This;
use Mojo::Base 'Mojolicious::Controller';
my $final;
/something/ and push @$final, $_ for @_;
return $final;
}
And then you can test your filter method normally:
# t/basic.t
use Test::More;
use Test::Mojo;
# Test the controller / action and the use of any models
my $t = Test::Mojo->new('App');
$t->get_ok('/list' => json => {value => ['abc', 'def something ghi', 'jkl', 'mno something pqr']})
->status_is(200)
->json_is('/value', ['def something ghi', 'mno something pqr']);
# Test just the model
my $model = App::Model->new;
isa_ok $model, 'App::Model';
is_deeply $model->filter('abc', 'def something ghi', 'jkl', 'mno something pqr'), ['def something ghi', 'mno something pqr'];