summaryrefslogtreecommitdiff
path: root/tests/test.php
diff options
context:
space:
mode:
authorChristoph Burschka2016-04-04 18:29:25 +0000
committerChristoph Burschka2016-04-04 18:29:25 +0000
commit876ecc19572f98bd40c128d4e01e5a3a949c5153 (patch)
treed0e96c3ab74060529f8e20a0c5e069f9cd6299af /tests/test.php
parentFix #11: Revert escape sequences in XMPP node names. (diff)
downloadejabberd-auth-php-876ecc19572f98bd40c128d4e01e5a3a949c5153.tar.gz
Test with domain argument.
If a bridge actually uses the domain part when authenticating, then the unit tests also needs to be able to pass one instead of hardcoding "localhost".
Diffstat (limited to 'tests/test.php')
-rwxr-xr-xtests/test.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/test.php b/tests/test.php
index 91b2dbb..c37fa82 100755
--- a/tests/test.php
+++ b/tests/test.php
@@ -1,16 +1,17 @@
#!/usr/bin/env php
<?php
-if ($_SERVER['argc'] != 3) {
+if ($_SERVER['argc'] != 4) {
die(
'Usage:
- test.php <valid-user> <valid-pass>
+ test.php <valid-user> <valid-domain> <valid-pass>
');
}
$valid_account = [
'user' => $_SERVER['argv'][1],
- 'password' => $_SERVER['argv'][2],
+ 'domain' => $_SERVER['argv'][2],
+ 'password' => $_SERVER['argv'][3],
];
require_once __DIR__ . '/unit_test.php';