diff --git a/Models/NewsArticle.php b/Models/NewsArticle.php index cd21f20..e663a15 100755 --- a/Models/NewsArticle.php +++ b/Models/NewsArticle.php @@ -484,14 +484,6 @@ class NewsArticle implements \JsonSerializable, ArrayableInterface ]; } - /** - * {@inheritdoc} - */ - public function __toString() - { - return (string) \json_encode($this->toArray()); - } - /** * {@inheritdoc} */ diff --git a/tests/Controller/ApiControllerTest.php b/tests/Controller/ApiControllerTest.php index 162084f..58f7b76 100755 --- a/tests/Controller/ApiControllerTest.php +++ b/tests/Controller/ApiControllerTest.php @@ -47,7 +47,6 @@ class ControllerTest extends \PHPUnit\Framework\TestCase $this->app->dbPool = $GLOBALS['dbpool']; $this->app->orgId = 1; - $this->app->appName = 'Backend'; $this->app->accountManager = new AccountManager($GLOBALS['session']); $this->app->appSettings = new CoreSettings($this->app->dbPool->get()); $this->app->moduleManager = new ModuleManager($this->app, __DIR__ . '/../../../Modules'); diff --git a/tests/Models/NullNewsArticleTest.php b/tests/Models/NullNewsArticleTest.php new file mode 100644 index 0000000..139c657 --- /dev/null +++ b/tests/Models/NullNewsArticleTest.php @@ -0,0 +1,42 @@ +getId()); + } +}