diff options
author | Tobia De Koninck <LEDfan@users.noreply.github.com> | 2018-11-29 16:31:18 +0300 |
---|---|---|
committer | Tobia De Koninck <LEDfan@users.noreply.github.com> | 2018-11-29 16:31:18 +0300 |
commit | 0fda247ba0ce033e2cb91327c7ed2fd3e1779615 (patch) | |
tree | 7889fd8445ed139383911a82daab61f22f4bda6b /tests/integration | |
parent | a52bf92e4e1d190bc22860dbf497feedd5e0fe3a (diff) |
Fix tests after #108
Diffstat (limited to 'tests/integration')
-rw-r--r-- | tests/integration/db/IqRosterPushTest.php | 3 | ||||
-rw-r--r-- | tests/integration/db/IqRosterTest.php | 3 | ||||
-rw-r--r-- | tests/integration/db/MessageMapperTest.php | 6 |
3 files changed, 7 insertions, 5 deletions
diff --git a/tests/integration/db/IqRosterPushTest.php b/tests/integration/db/IqRosterPushTest.php index a33a26b..02ecbb9 100644 --- a/tests/integration/db/IqRosterPushTest.php +++ b/tests/integration/db/IqRosterPushTest.php @@ -22,7 +22,8 @@ class IqRosterPushTest extends TestCase $iqRosterPush->setSubscription('both'); $this->assertEquals('john@localhost', $iqRosterPush->getJid()); - $this->assertEquals('jan@localhost', $iqRosterPush->getUnSanitizedTo()); + $this->assertEquals('jan', $iqRosterPush->getUnSanitizedTo()); + $this->assertEquals('jan@localhost', $iqRosterPush->to); $this->assertEquals('john', $iqRosterPush->getName()); $this->assertEquals('both', $iqRosterPush->getSubscription()); diff --git a/tests/integration/db/IqRosterTest.php b/tests/integration/db/IqRosterTest.php index a53686e..377acc8 100644 --- a/tests/integration/db/IqRosterTest.php +++ b/tests/integration/db/IqRosterTest.php @@ -23,7 +23,8 @@ class IqRosterTest extends TestCase $iqRoster->addItem('test2@test.be', 'Test2 Test'); $this->assertEquals('result', $iqRoster->getType()); - $this->assertEquals('john@localhost', $iqRoster->getUnSanitizedTo()); + $this->assertEquals('john', $iqRoster->getUnSanitizedTo()); + $this->assertEquals('john@localhost', $iqRoster->to); $this->assertEquals(4434, $iqRoster->getQid()); $this->assertEquals([ [ diff --git a/tests/integration/db/MessageMapperTest.php b/tests/integration/db/MessageMapperTest.php index 41d45ad..ea79114 100644 --- a/tests/integration/db/MessageMapperTest.php +++ b/tests/integration/db/MessageMapperTest.php @@ -159,15 +159,15 @@ class MessageMapperTest extends MapperTestUtility $this->assertCount(2, $result); // check findByTo - $result = $this->mapper->findByTo(Application::sanitizeUserId('john@localhost.com')); + $result = $this->mapper->findByTo('john@localhost.com'); $this->assertCount(1, $result); $this->assertEquals('<message to="john_ojsxc_esc_at_localhost.com@localhost/internal" from="jan_ojsxc_esc_at_localhost.com@localhost/internal" type="test" xmlns="jabber:client" id="4-msg">Messageabc</message>', $result[0]->getStanza()); // check if element is deleted $result = $this->fetchAll(); $this->assertCount(1, $result); - $this->assertEquals($stanza2->getUnSanitizedFrom(), $result[0]->getFrom()); - $this->assertEquals($stanza2->getUnSanitizedTo(), $result[0]->getTo()); + $this->assertEquals($stanza2->getFrom(), $result[0]->getFrom()); + $this->assertEquals($stanza2->getTo(), $result[0]->getTo()); $this->assertEquals('<message to="jan_ojsxc_esc_at_localhost.com" from="thomas_ojsxc_esc_at_localhost.com" type="test2" xmlns="jabber:client" id="4-msg">Message</message>', $result[0]->getStanza()); } } |