exampleapp/tests/Unit/TasksTest.php

29 lines
556 B
PHP

<?php
namespace Tests\Unit;
use Tests\TestCase;
use Modules\ModulesProvider;
class TasksTest extends TestCase
{
/**
* A basic unit test example.
*/
public function test_example(): void
{
$this->assertTrue(true);
}
public function test_insert(): void
{
$mp = new ModulesProvider;
$api = $mp->getTasksModule()->getApplicationFactory()->getApi();
$data = [
'title' => 'test_task',
];
$success = $api->insert($data);
$this->assertTrue($success);
}
}