- Issue created by @mglaman
- last update
over 1 year ago 21 pass, 8 fail - @mglaman opened merge request.
- Status changed to Needs work
over 1 year ago 5:17pm 22 September 2023 - πΊπΈUnited States mglaman WI, USA
I believe this uncovered bugs in the tests.
public function testValidPublishStateToUnPublishStateTransition() { $node = Node::create([ 'type' => 'example', 'title' => 'Test title', 'moderation_state' => 'draft', 'unpublish_on' => strtotime('+3 days'), 'publish_on' => strtotime('+2 days'), 'unpublish_state' => 'archived', 'publish_state' => 'published', ]); $violations = $node->validate(); $this->assertCount(0, $violations, 'Both transitions should pass validation'); }
This is failing. But
draft -> archive
was never a valid transition. Fromdraft
onlycreate_new_draft
andpublish
are valid. - π¬π§United Kingdom jonathan1055
Thanks for this, @mglaman.
Moving to the 3.x branch as it would have to be done there first. Open a new MR, as we can use MR48 if it gets back-ported to 2.x