diff options
author | Tobia De Koninck <tobia@ledfan.be> | 2017-10-15 09:50:55 +0300 |
---|---|---|
committer | Tobia De Koninck <tobia@ledfan.be> | 2017-10-15 09:50:55 +0300 |
commit | 4b6daef6b775e5372dce62ccaaba6faac3cff6c2 (patch) | |
tree | 1c724b67028904ffbdc6b7507bff90552b4ada01 /tests/integration/db/IqRosterPushTest.php | |
parent | 75b7a02f9478b23365d5fb4b3bbac2d3114498e5 (diff) |
Escape characters allowed in the NC username which is not allowed in the
XMPP username.
- `@`, `'`, ` `, will now be replaced by `_ojsxc_esc_space_`,
`_ojsxc_squote_space_` and `_ojsxc_esc_at_` respectively
- cleanuped tests and code to always store the userId and not a JID in
the database
Signed-off-by: Tobia De Koninck <tobia@ledfan.be>
Diffstat (limited to 'tests/integration/db/IqRosterPushTest.php')
-rw-r--r-- | tests/integration/db/IqRosterPushTest.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/integration/db/IqRosterPushTest.php b/tests/integration/db/IqRosterPushTest.php index e6e8c0d..7be4278 100644 --- a/tests/integration/db/IqRosterPushTest.php +++ b/tests/integration/db/IqRosterPushTest.php @@ -16,15 +16,15 @@ class IqRosterPushTest extends TestCase $writer->writeAttribute('xmlns', 'http://jabber.org/protocol/httpbind'); $iqRosterPush = new IQRosterPush(); - $iqRosterPush->setJid('john@localhost'); - $iqRosterPush->setTo('jan@localhost'); + $iqRosterPush->setJid('john', 'localhost'); + $iqRosterPush->setTo('jan', 'localhost'); $iqRosterPush->setName('john'); $iqRosterPush->setSubscription('both'); - $this->assertEquals($iqRosterPush->getJid(), 'john@localhost'); - $this->assertEquals($iqRosterPush->getTo(), 'jan@localhost'); - $this->assertEquals($iqRosterPush->getName(), 'john'); - $this->assertEquals($iqRosterPush->getSubscription(), 'both'); + $this->assertEquals('john@localhost', $iqRosterPush->getJid()); + $this->assertEquals('jan@localhost', $iqRosterPush->getTo()); + $this->assertEquals('john', $iqRosterPush->getName()); + $this->assertEquals('both', $iqRosterPush->getSubscription()); $writer->write($iqRosterPush); // needed to test the xmlSerialize function |