Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/jsxc.nextcloud.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsualko <klaus@jsxc.org>2020-06-30 17:57:41 +0300
committersualko <klaus@jsxc.org>2020-06-30 17:57:41 +0300
commit7f43f8d10f7604fb617c7cd7f13a590c7de8787c (patch)
treef18bca3041b6413b1e0ecea5ff8e1668158a7c47
parentf20c27fa095cc3644849fe511b572617540316b5 (diff)
test: replace deprecated annotations
-rw-r--r--tests/Integration/Db/MessageMapperTest.php10
-rw-r--r--tests/Integration/Db/StanzaMapperTest.php10
2 files changed, 8 insertions, 12 deletions
diff --git a/tests/Integration/Db/MessageMapperTest.php b/tests/Integration/Db/MessageMapperTest.php
index 1e24aba..4f497b0 100644
--- a/tests/Integration/Db/MessageMapperTest.php
+++ b/tests/Integration/Db/MessageMapperTest.php
@@ -69,19 +69,17 @@ class MessageMapperTest extends MapperTestUtility
$this->assertEquals(null, $result[0]->getType()); // type is saved into the XML string, not the DB.
}
- /**
- * @expectedException \OCP\AppFramework\Db\DoesNotExistException
- */
public function testFindByToNotFound()
{
+ $this->expectedException(\OCP\AppFramework\Db\DoesNotExistException::class);
+
$this->mapper->findByTo('test');
}
- /**
- * @expectedException \OCP\AppFramework\Db\DoesNotExistException
- */
public function testFindByToNotFound2()
{
+ $this->expectedException(\OCP\AppFramework\Db\DoesNotExistException::class);
+
$stanza = new Message();
$stanza->setFrom('john', 'localhost');
$stanza->setTo('john', 'localhost');
diff --git a/tests/Integration/Db/StanzaMapperTest.php b/tests/Integration/Db/StanzaMapperTest.php
index efe27e3..808925a 100644
--- a/tests/Integration/Db/StanzaMapperTest.php
+++ b/tests/Integration/Db/StanzaMapperTest.php
@@ -59,19 +59,17 @@ class StanzaMapperTest extends MapperTestUtility
$this->assertEquals($stanza->getStanza(), $result[0]->getStanza());
}
- /**
- * @expectedException \OCP\AppFramework\Db\DoesNotExistException
- */
public function testFindByToNotFound()
{
+ $this->expectedException(\OCP\AppFramework\Db\DoesNotExistException::class);
+
$this->mapper->findByTo('test');
}
- /**
- * @expectedException \OCP\AppFramework\Db\DoesNotExistException
- */
public function testFindByToNotFound2()
{
+ $this->expectedException(\OCP\AppFramework\Db\DoesNotExistException::class);
+
$stanza = new Stanza();
$stanza->setFrom('john@localhost');
$stanza->setTo('john@localhost');