Skip to content

Commit

Permalink
Assert the type of registered CompleteSetupTask
Browse files Browse the repository at this point in the history
  • Loading branch information
tomalec authored and matt-h committed Aug 8, 2023
1 parent 9697343 commit e20e37d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tests/Unit/TaskList/CompleteSetupTaskTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,15 @@ public function setUp(): void {
}

/**
* Test the task is added to the `extended` list.
* Test a CompleteSetupTask is added to the `extended` list.
*
* The addition should happen in `register` method, then `init` called before the test was started,
* so we do not precisely assert that timing.
* The addition should happen in `register` method, then `init` called before the test was started.
* So, we do not precisely assert timing and exact instance, only the presence of a task.
*/
public function test_register() {
$this->assertNotNull( TaskLists::get_list( 'extended' )->get_task( 'gla_complete_setup' ) );
$this->assertInstanceOf( CompleteSetupTask::class, TaskLists::get_list( 'extended' )->get_task( 'gla_complete_setup' ) );

}

public function test_id() {
Expand Down

0 comments on commit e20e37d

Please sign in to comment.