job_id = tripal_add_job('Test adding jobs', 'test_module', 'test_callback', [], 1); $this->assertTrue(is_numeric($this->job_id)); } /** * Tests whether creating a duplicate job is possible. * * @test */ public function should_refuse_to_create_duplicate_job() { $job = tripal_add_job('Test adding jobs', 'test_module', 'test_callback', [], 1, 10, TRUE); $this->assertEmpty($job); } /** * Run clean up */ public function __destruct() { // Clean up any data inserted to the DB if ($this->job_id) { db_query('DELETE FROM {tripal_jobs} WHERE job_id = :id', [':id' => $this->job_id]); } } }