aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/AppFramework/Db/EntityTest.php
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2019-11-27 15:27:18 +0100
committerRoeland Jago Douma <roeland@famdouma.nl>2019-11-27 15:27:18 +0100
commit3a7cf40aaa678bea1df143d2982d603b7a334eec (patch)
tree63c1e3ad7f7f401d14411a4d44c523632906afc9 /tests/lib/AppFramework/Db/EntityTest.php
parent0568b012672d650c6b5a49e72c4028dde5463c60 (diff)
downloadnextcloud-server-3a7cf40aaa678bea1df143d2982d603b7a334eec.tar.gz
nextcloud-server-3a7cf40aaa678bea1df143d2982d603b7a334eec.zip
Mode to modern phpunit
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'tests/lib/AppFramework/Db/EntityTest.php')
-rw-r--r--tests/lib/AppFramework/Db/EntityTest.php24
1 files changed, 12 insertions, 12 deletions
diff --git a/tests/lib/AppFramework/Db/EntityTest.php b/tests/lib/AppFramework/Db/EntityTest.php
index 3eb9f6eef51..c8ebda55a86 100644
--- a/tests/lib/AppFramework/Db/EntityTest.php
+++ b/tests/lib/AppFramework/Db/EntityTest.php
@@ -129,25 +129,25 @@ class EntityTest extends \Test\TestCase {
}
- /**
- * @expectedException \BadFunctionCallException
- */
+
public function testCallShouldOnlyWorkForGetterSetter(){
+ $this->expectException(\BadFunctionCallException::class);
+
$this->entity->something();
}
- /**
- * @expectedException \BadFunctionCallException
- */
+
public function testGetterShouldFailIfAttributeNotDefined(){
+ $this->expectException(\BadFunctionCallException::class);
+
$this->entity->getTest();
}
- /**
- * @expectedException \BadFunctionCallException
- */
+
public function testSetterShouldFailIfAttributeNotDefined(){
+ $this->expectException(\BadFunctionCallException::class);
+
$this->entity->setTest();
}
@@ -245,10 +245,10 @@ class EntityTest extends \Test\TestCase {
$this->assertThat($entity->isAnotherBool(), new IsType(IsType::TYPE_BOOL));
}
- /**
- * @expectedException BadFunctionCallException
- */
+
public function testIsGetterShoudFailForOtherType() {
+ $this->expectException(\BadFunctionCallException::class);
+
$entity = new TestEntity();
$entity->setName('hello');
$this->assertThat($entity->isName(), new IsType(IsType::TYPE_BOOL));