-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #63 from andrewnicols/abstract_test_methods
Handle the case where an abstract testcase exists
- Loading branch information
Showing
3 changed files
with
33 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
moodle/Tests/fixtures/phpunit/testcasenames_with_abstract_test.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?php | ||
namespace local_codechecker; | ||
defined("MOODLE_INTERNAL") || die(); // Make this always the 1st line in all CS fixtures. | ||
|
||
/** | ||
* Class which is an abstract testcase. | ||
*/ | ||
abstract class testcasenames_with_abstract_test extends base_test { | ||
abstract public function generate_test_data(): array; | ||
|
||
abstract public function generate_example_data(); | ||
|
||
public function test_something(): void { | ||
$data = $this->generate_test_data(); | ||
// Test something with the data. | ||
} | ||
} |