Skip to content

Commit

Permalink
[jan] Add remoteHost() to Horde_Test_Stub_Registry.
Browse files Browse the repository at this point in the history
  • Loading branch information
yunosh committed Dec 5, 2014
1 parent 9bff71a commit 02976b8
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
20 changes: 20 additions & 0 deletions framework/Test/lib/Horde/Test/Stub/Registry.php
Expand Up @@ -112,6 +112,26 @@ public function isAdmin(array $options = array())
return false;
}

/**
* Returns information about the remote host.
*
* @return object An object with the following properties:
* <pre>
* - addr: (string) Remote IP address.
* - host: (string) Remote hostname (if resolvable; otherwise, this value
* is identical to 'addr').
* - proxy: (boolean) True if this user is connecting through a proxy.
* </pre>
*/
public function remoteHost()
{
return (object)array(
'addr' => '1.2.3.4',
'host' => 'example.com',
'proxy' => false
);
}

/**
* Load a configuration file from a Horde application's config directory.
* This call is cached (a config file is only loaded once, regardless of
Expand Down
4 changes: 2 additions & 2 deletions framework/Test/package.xml
Expand Up @@ -27,7 +27,7 @@
</stability>
<license uri="http://www.horde.org/licenses/lgpl21">LGPL-2.1</license>
<notes>
*
* [jan] Add remoteHost() to Horde_Test_Stub_Registry.
</notes>
<contents>
<dir baseinstalldir="/" name="/">
Expand Down Expand Up @@ -2833,7 +2833,7 @@
<date>2014-11-18</date>
<license uri="http://www.horde.org/licenses/lgpl21">LGPL-2.1</license>
<notes>
*
* [jan] Add remoteHost() to Horde_Test_Stub_Registry.
</notes>
</release>
</changelog>
Expand Down

0 comments on commit 02976b8

Please sign in to comment.