File tree 3 files changed +65
-1
lines changed
3 files changed +65
-1
lines changed Original file line number Diff line number Diff line change @@ -13,5 +13,5 @@ interface BlockParserInterface
13
13
* @param string $postContent Content of a WP post (e.g. WP_Post post_content).
14
14
* @return BlockInterface[]
15
15
*/
16
- public function parseBlock (string $ postContent ): array ;
16
+ public function parseBlocks (string $ postContent ): array ;
17
17
}
Original file line number Diff line number Diff line change
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 number Diff line number Diff line change
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
+ }
You can’t perform that action at this time.
0 commit comments