/**
* Create variables used by tests.
*/
- protected function setUp()
+ public function setUp()
{
parent::setUp();
- // Reusable App object
- $this->app = BaseObject::getApp();
+ require_once __DIR__.'/../include/api.php';
// User data that the test database is populated with
$this->selfUser = [
{
parent::tearDown();
- $app = get_app();
- $app->argc = 1;
- $app->argv = ['home'];
+ $this->app->argc = 1;
+ $this->app->argv = ['home'];
}
/**
*/
public function testApiShareAsRetweet()
{
- $item = ['body' => ''];
+ $item = ['body' => '', 'author-id' => 1, 'owner-id' => 1];
$result = api_share_as_retweet($item);
$this->assertFalse($result);
}