Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Gutenberg/BlockParserInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ interface BlockParserInterface
* @param string $postContent Content of a WP post (e.g. WP_Post post_content).
* @return BlockInterface[]
*/
public function parseBlock(string $postContent): array;
public function parseBlocks(string $postContent): array;
}
32 changes: 32 additions & 0 deletions tests/unit/Gutenberg/BlockInterfaceTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?php

namespace WpOop\WordPress\Test\Unit\Gutenberg;

use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\TestCase;
use WpOop\WordPress\Gutenberg\BlockInterface as Subject;

class BlockInterfaceTest extends TestCase
{
/**
* @return Subject|MockObject
*/
protected function createSubject(): Subject
{
$mock = $this->getMockBuilder(Subject::class)
->getMock();

return $mock;
}

public function testInstantiation()
{
{
$subject = $this->createSubject();
}

{
$this->assertInstanceOf(Subject::class, $subject);
}
}
}
32 changes: 32 additions & 0 deletions tests/unit/Gutenberg/BlockParserInterfaceTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?php

namespace WpOop\WordPress\Test\Unit\Gutenberg;

use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\TestCase;
use WpOop\WordPress\Gutenberg\BlockParserInterface as Subject;

class BlockParserInterfaceTest extends TestCase
{
/**
* @return Subject|MockObject
*/
protected function createSubject(): Subject
{
$mock = $this->getMockBuilder(Subject::class)
->getMock();

return $mock;
}

public function testInstantiation()
{
{
$subject = $this->createSubject();
}

{
$this->assertInstanceOf(Subject::class, $subject);
}
}
}