summaryrefslogtreecommitdiffstats
path: root/tests/Unit/Controller/JSONHttpErrorTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Unit/Controller/JSONHttpErrorTest.php')
-rw-r--r--tests/Unit/Controller/JSONHttpErrorTest.php14
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/Unit/Controller/JSONHttpErrorTest.php b/tests/Unit/Controller/JSONHttpErrorTest.php
index 3b48bc36e..8bfb11f3e 100644
--- a/tests/Unit/Controller/JSONHttpErrorTest.php
+++ b/tests/Unit/Controller/JSONHttpErrorTest.php
@@ -14,14 +14,8 @@
namespace OCA\News\Tests\Unit\Controller;
use OCA\News\Controller\JSONHttpErrorTrait;
-
use PHPUnit\Framework\TestCase;
-class Test
-{
- use JSONHttpErrorTrait;
-}
-
class JSONHttpErrorTest extends TestCase
{
@@ -29,7 +23,7 @@ class JSONHttpErrorTest extends TestCase
public function testError()
{
$ex = new \Exception('hi');
- $test = new Test();
+ $test = new DummyTraitingClass();
$result = $test->error($ex, 3);
$this->assertEquals(['message' => 'hi'], $result->getData());
@@ -37,4 +31,10 @@ class JSONHttpErrorTest extends TestCase
}
+}
+
+
+class DummyTraitingClass
+{
+ use JSONHttpErrorTrait;
} \ No newline at end of file