123456789101112131415161718192021 |
- <?php
- use PHPUnit\Framework\TestCase;
- class TripalJobsTest extends TestCase {
- /**
- * Tests the ability to create a tripal job.
- *
- * @test
- */
- public function should_create_a_tripal_job() {
- $job_id = tripal_add_job('Test adding jobs', 'tripal', 'tripal_tripal_cron_notification', [], 1);
- $this->assertTrue(is_numeric($job_id));
- // Clean up
- if($job_id) {
- db_query('DELETE FROM {tripal_jobs} WHERE job_id = :id', [':id' => $job_id]);
- }
- }
- }
|