Skip to content

Commit

Permalink
Add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
swissspidy committed Nov 6, 2023
1 parent c301464 commit 6cc00de
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions tests/phpunit/Checker/Default_Check_Collection_Tests.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,4 +90,26 @@ public function test_require_with_invalid() {

$this->collection->require( array( 'static_check', 'invalid_check' ) );
}

public function test_exclude() {
$this->assertSame(
array( $this->checks['runtime_check'] ),
$this->collection->exclude( array( 'static_check' ) )->to_array()
);
}

public function test_exclude_with_empty() {
$this->assertSame(
array_values( $this->checks ),
$this->collection->exclude( array() )->to_array()
);
}

public function test_exclude_with_invalid() {
$this->assertSame(
array( $this->checks['runtime_check'] ),
$this->collection->exclude( array( 'invalid_check' ) )->to_array()
);
}

}

0 comments on commit 6cc00de

Please sign in to comment.