NAME

DDG::Test::Language - Gives functions for getting test DDG::Language objects.

VERSION

version 1018

DESCRIPTION

Installs functions for getting test languages.

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

EXPORTS FUNCTIONS

test_language

Gives back an example DDG::Location defined by the first parameter. Possible values are us, de and my.

test_language_by_env

Will give back a DDG::Language like </test_language> but will take the location definition by the ENV variable DDG_TEST_LANGUAGE. If none is given then us will be assumed. App::DuckPAN is also using this function for getting the language for the sample requests, so you can set another location with prefixing your startup of server or query with the ENV variable:

DDG_TEST_LANGUAGE=de duckpan server

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