1
0
mirror of https://github.com/chylex/Nextcloud-News.git synced 2025-04-12 10:15:44 +02:00
Nextcloud-News/tests/Unit/Controller/JSONHttpErrorTest.php
Sean Molenaar 17e85dd507 Unit: Fix unittests ()
* Unit: Fix unittests

Issue 

* Tests: Move test namespace to the expected nextcloud namespace
2018-03-18 15:01:08 +01:00

35 lines
798 B
PHP

<?php
/**
* Nextcloud - News
*
* This file is licensed under the Affero General Public License version 3 or
* later. See the COPYING file.
*
* @author Alessandro Cosentino <cosenal@gmail.com>
* @author Bernhard Posselt <dev@bernhard-posselt.com>
* @copyright Alessandro Cosentino 2012
* @copyright Bernhard Posselt 2012, 2014
*/
namespace OCA\News\Tests\Unit\Controller;
use OCA\News\Controller\JSONHttpError;
class Test {
use JSONHttpError;
}
class JSONHttpErrorTest extends \PHPUnit_Framework_TestCase {
public function testError() {
$ex = new \Exception('hi');
$test = new Test();
$result = $test->error($ex, 3);
$this->assertEquals(['message' => 'hi'], $result->getData());
$this->assertEquals(3, $result->getStatus());
}
}