NAME

DDG::Test::Goodie - Adds keywords to easily test Goodie plugins.

VERSION

version 1018

DESCRIPTION

Installs functions for testing Goodies.

Warning: Be aware that you only use this module inside your test files in t/.

EXPORTS FUNCTIONS

test_zci

Easy function to generate a DDG::ZeroClickInfo for the test. See "ddg_goodie_test".

You can predefine parameters via "zci".

zci

You can predefine DDG::ZeroClickInfo parameters for usage in "test_zci".

This function can be used several times to change specific defaults on the fly.

ddg_goodie_test

With this function you can easily generate a small own DDG::Block for testing your DDG::Goodie alone or in combination with others.

  ddg_goodie_test(
	[qw( DDG::Goodie::MyGoodie )],
	'mygooodie data' => test_zci('data', html => '<div>data</div>'),
	'mygooodie data2' => test_zci('data2', html => '<div>data2</div>'),
  );

AUTHOR

DuckDuckGo <open@duckduckgo.com>

COPYRIGHT AND LICENSE

This software is Copyright (c) 2013 by DuckDuckGo, Inc. https://duckduckgo.com/.

This is free software, licensed under:

The Apache License, Version 2.0, January 2004