Skip to content

Commit 2b12f4c

Browse files
authored
Merge pull request #4 from AlexP11223/fix/name
2 parents 5ac11a9 + a93b261 commit 2b12f4c

File tree

3 files changed

+65
-1
lines changed

3 files changed

+65
-1
lines changed

src/Gutenberg/BlockParserInterface.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ interface BlockParserInterface
1313
* @param string $postContent Content of a WP post (e.g. WP_Post post_content).
1414
* @return BlockInterface[]
1515
*/
16-
public function parseBlock(string $postContent): array;
16+
public function parseBlocks(string $postContent): array;
1717
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<?php
2+
3+
namespace WpOop\WordPress\Test\Unit\Gutenberg;
4+
5+
use PHPUnit\Framework\MockObject\MockObject;
6+
use PHPUnit\Framework\TestCase;
7+
use WpOop\WordPress\Gutenberg\BlockInterface as Subject;
8+
9+
class BlockInterfaceTest extends TestCase
10+
{
11+
/**
12+
* @return Subject|MockObject
13+
*/
14+
protected function createSubject(): Subject
15+
{
16+
$mock = $this->getMockBuilder(Subject::class)
17+
->getMock();
18+
19+
return $mock;
20+
}
21+
22+
public function testInstantiation()
23+
{
24+
{
25+
$subject = $this->createSubject();
26+
}
27+
28+
{
29+
$this->assertInstanceOf(Subject::class, $subject);
30+
}
31+
}
32+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<?php
2+
3+
namespace WpOop\WordPress\Test\Unit\Gutenberg;
4+
5+
use PHPUnit\Framework\MockObject\MockObject;
6+
use PHPUnit\Framework\TestCase;
7+
use WpOop\WordPress\Gutenberg\BlockParserInterface as Subject;
8+
9+
class BlockParserInterfaceTest extends TestCase
10+
{
11+
/**
12+
* @return Subject|MockObject
13+
*/
14+
protected function createSubject(): Subject
15+
{
16+
$mock = $this->getMockBuilder(Subject::class)
17+
->getMock();
18+
19+
return $mock;
20+
}
21+
22+
public function testInstantiation()
23+
{
24+
{
25+
$subject = $this->createSubject();
26+
}
27+
28+
{
29+
$this->assertInstanceOf(Subject::class, $subject);
30+
}
31+
}
32+
}

0 commit comments

Comments
 (0)