NAME

Mockery - Mock objects for testing purposes

VERSION

Version 0.02

SYNOPSIS

use Mockery;

my $mockery = Mockery->new();

$mockery->action(
	class => 'Nefarious',
	methods => {
		nefarious => sub {
			...
			return $nefarious;
		}
	}
);

Nefarious->new(...)->nefarious(...); # nefarious

$mockery->fake(
	class => 'Heinous',
	methods => {
		heinous => sub {
			...
			return $heinous;
		},
		...
	}
);

Heinous->new->heinous(...); # $heinous

$mockery->true(
	class => 'Nefarious',
	methods => ['Nefarious', ...]
);

Nefarious->new(...)->nefarious(...); # 1

$mockery->false(
	class => 'Heinous',
	methods => ['heinous', ...]
);

Heinous->new->heinous(...); # 0

AUTHOR

LNATION, <email at lnation.org>

BUGS

Please report any bugs or feature requests to bug-mockery at rt.cpan.org, or through the web interface at https://rt.cpan.org/NoAuth/ReportBug.html?Queue=Mockery. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

perldoc Mockery

You can also look for information at:

ACKNOWLEDGEMENTS

LICENSE AND COPYRIGHT

This software is Copyright (c) 2023->2025 by LNATION.

This is free software, licensed under:

The Artistic License 2.0 (GPL Compatible)