Replies: 1 comment 1 reply
-
2024-06-18 (😖)Working off the main branch of OJS for now. I have a class ExplorationTest extends DatabaseTestCase
{
public function getAffectedTables()
{
return PKPTestHelper::PKP_TEST_ENTIRE_DB;
}
public function testDebug(): void
{
Repo::submission()->delete(Repo::submission()->get(1));
$subCount = DB::table('submissions')->count();
$this->assertNotEquals(18, $subCount);
}
public function testDebugTwo(): void
{
$subCount = DB::table('submissions')->count();
$this->assertEquals(19, $subCount);
}
} Fixable errors (through documentation, user configuration, etc.):
Errors requiring code changes:
Next steps:
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am currently exploring with it could look like to make greater use of so-called "feature tests" with PHPUnit to do more of testing. While there can be many different definitions of unit vs. feature tests, for the purpose of this discussion, I'm considering any PHPUnit test that tests overall functionality that may require hitting the database or combining discrete systems to complete an action as feature tests. An example of this would be using PHPUnit tests to ensure publication ordering behaves in an expected way in a number of different circumstances, e.g. added sequentially to an issue, when different version of a submission are created, when custom ordering is used, etc.
This will help in form part of the discussion in #10032.
As I try things out, I will add to the discussion here.
Beta Was this translation helpful? Give feedback.
All reactions