From 870023365c928e6bc3bd39d0d7f9b4d976dad33e Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 24 Jan 2018 18:10:16 +0100 Subject: Fix "Undefined method setExpectedException()" Signed-off-by: Joas Schilling --- tests/lib/AppFramework/Db/EntityTest.php | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'tests/lib/AppFramework/Db/EntityTest.php') diff --git a/tests/lib/AppFramework/Db/EntityTest.php b/tests/lib/AppFramework/Db/EntityTest.php index e1a3d7533be..c9a90da7c59 100644 --- a/tests/lib/AppFramework/Db/EntityTest.php +++ b/tests/lib/AppFramework/Db/EntityTest.php @@ -46,7 +46,7 @@ class TestEntity extends Entity { protected $preName; public function __construct($name=null){ - $this->addType('testId', 'integer'); + $this->addType('testId', 'integer'); $this->name = $name; } }; @@ -119,23 +119,26 @@ class EntityTest extends \Test\TestCase { } + /** + * @expectedException \BadFunctionCallException + */ public function testCallShouldOnlyWorkForGetterSetter(){ - $this->setExpectedException('\BadFunctionCallException'); - $this->entity->something(); } + /** + * @expectedException \BadFunctionCallException + */ public function testGetterShouldFailIfAttributeNotDefined(){ - $this->setExpectedException('\BadFunctionCallException'); - $this->entity->getTest(); } + /** + * @expectedException \BadFunctionCallException + */ public function testSetterShouldFailIfAttributeNotDefined(){ - $this->setExpectedException('\BadFunctionCallException'); - $this->entity->setTest(); } -- cgit v1.2.3