package GitLab::API::v4::Mock; our $VERSION = '0.26'; =encoding utf8 =head1 NAME GitLab::API::v4::Mock - Mock API object for testing. =head1 SYNOPSIS use GitLab::API::v4::Mock; my $api = GitLab::API::v4::Mock->new(); =head1 DESCRIPTION This module is a subclass of L. It modifies it to mock the REST client via L. This module is meant to be used for writing unit tests. =cut use GitLab::API::v4::Mock::RESTClient; use Moo; use strictures 2; use namespace::clean; extends 'GitLab::API::v4'; =head1 ATTRIBUTES =head2 url This attribute is altered from L to default to C and to not be required. =cut has '+url' => ( required => 0, default => 'https://example.com/api/v4', ); =head2 rest_client_class This attribute is altered from L to default to L. =cut sub _build_rest_client_class { return 'GitLab::API::v4::Mock::RESTClient'; } 1; __END__ =head1 SUPPORT See L. =head1 AUTHORS See L. =head1 COPYRIGHT AND LICENSE See L. =cut