planner = new ReleasePlanner; } public function test_stable_version_offers_patch_minor_major_without_continue_rc(): void { $t = $this->planner->proposedTargets('0.9.58'); $this->assertSame('0.9.59', $t['patch']); $this->assertSame('0.10.0', $t['minor']); $this->assertSame('1.0.0', $t['major']); $this->assertArrayNotHasKey('continueRc', $t); } public function test_rc_version_also_offers_continue_rc_of_its_base(): void { $t = $this->planner->proposedTargets('0.10.0-rc3'); $this->assertSame('0.10.0', $t['continueRc']); $this->assertSame('0.10.1', $t['patch']); $this->assertSame('0.11.0', $t['minor']); $this->assertSame('1.0.0', $t['major']); } public function test_strips_a_leading_v(): void { $this->assertSame('0.9.59', $this->planner->proposedTargets('v0.9.58')['patch']); } public function test_allowed_targets_are_the_proposed_values(): void { $allowed = $this->planner->allowedTargets('0.10.0-rc1'); $this->assertContains('0.10.0', $allowed); // continueRc $this->assertContains('0.11.0', $allowed); // minor $this->assertNotContains('0.9.0', $allowed); } }