Skip to content

Tests#12

Merged
zunnu merged 5 commits into5.x-devfrom
tests
Sep 14, 2025
Merged

Tests#12
zunnu merged 5 commits into5.x-devfrom
tests

Conversation

@zunnu
Copy link
Copy Markdown
Owner

@zunnu zunnu commented Sep 14, 2025

  • Added base PHPUnit tests for the plugin.
  • Introduced filters to skip empty blocks.
  • Restored addBlocks() default append behavior (append = true).
  • Updated setBlock(null) so it clears any selection.

zunnu and others added 5 commits September 14, 2025 14:53
Added filters to remove empty blocks.
Changed addBlocks default append behavior back to true.
setBlocks null clears any selection and does nothing during afterRender
Added testing
@zunnu zunnu merged commit 1a4c002 into 5.x-dev Sep 14, 2025
4 checks passed
@josbeir
Copy link
Copy Markdown
Contributor

josbeir commented Sep 14, 2025

Great!

* Updated `setBlock(null)` so it clears any selection.

I'd rather see a clearBlocks() method that returns itself?

@zunnu
Copy link
Copy Markdown
Owner Author

zunnu commented Sep 14, 2025

That would definitely make the API clearer, so adding a dedicated clearBlocks() method makes sense.

Right now it’s technically possible to pass null to setBlock(), even though it doesn’t really do anything. Removing that support could be considered a breaking change, although in practice it’s unlikely anyone is actually passing null, since it doesn’t make much sense to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants