1313use FiveamCode \LaravelNotionApi \Entities \Blocks \NumberedListItem ;
1414use FiveamCode \LaravelNotionApi \Entities \Blocks \Paragraph ;
1515use FiveamCode \LaravelNotionApi \Entities \Blocks \Pdf ;
16+ use FiveamCode \LaravelNotionApi \Entities \Blocks \Quote ;
1617use FiveamCode \LaravelNotionApi \Entities \Blocks \ToDo ;
1718use FiveamCode \LaravelNotionApi \Entities \Blocks \Toggle ;
1819use FiveamCode \LaravelNotionApi \Entities \Blocks \Video ;
@@ -100,7 +101,7 @@ public function it_returns_block_collection_with_children_as_correct_instances()
100101 $ blockChildrenCollection = $ blockChildren ->asCollection ();
101102 $ this ->assertContainsOnly (Block::class, $ blockChildrenCollection );
102103 $ this ->assertIsIterable ($ blockChildrenCollection );
103- $ this ->assertCount (13 , $ blockChildrenCollection );
104+ $ this ->assertCount (14 , $ blockChildrenCollection );
104105
105106 // check paragraph
106107 $ blockChild = $ blockChildrenCollection [0 ];
@@ -201,6 +202,13 @@ public function it_returns_block_collection_with_children_as_correct_instances()
201202 $ this ->assertEquals ('TestCaption ' , $ blockChild ->getCaption ()->getPlainText ());
202203 $ this ->assertEquals ('external ' , $ blockChild ->getHostingType ());
203204 $ this ->assertEquals ('https://notion.so/testpdf.pdf ' , $ blockChild ->getUrl ());
205+
206+ // check quote
207+ $ blockChild = $ blockChildrenCollection [13 ];
208+ $ this ->assertInstanceOf (Quote::class, $ blockChild );
209+ $ this ->assertEquals ('quote ' , $ blockChild ->getType ());
210+ $ this ->assertFalse ($ blockChild ->hasChildren ());
211+ $ this ->assertEquals ('quote_block ' , $ blockChild ->getContent ()->getPlainText ());
204212 }
205213
206214 /** @test */
@@ -251,6 +259,7 @@ public function it_returns_parent_block_in_which_new_blocks_have_been_successful
251259 $ file = File::create ('https://images.unsplash.com/photo-1593642533144-3d62aa4783ec?ixlib=rb-1.2.1&q=85&fm=jpg&crop=entropy&cs=srgb ' , 'Testcaption ' );
252260 $ video = Video::create ('https://www.w3schools.com/html/mov_bbb.mp4 ' , 'TestCaption ' );
253261 $ pdf = Pdf::create ('https://notion.so/testpdf.pdf ' , 'TestCaption ' );
262+ $ quote = Quote::create ('New TextBlock ' );
254263
255264 $ parentBlock = Notion::block ('1d719dd1-563b-4387-b74f-20da92b827fb ' )->append ($ paragraph );
256265 $ this ->assertInstanceOf (Block::class, $ parentBlock );
@@ -291,7 +300,10 @@ public function it_returns_parent_block_in_which_new_blocks_have_been_successful
291300 $ parentBlock = Notion::block ('1d719dd1-563b-4387-b74f-20da92b827fb ' )->append ($ pdf );
292301 $ this ->assertInstanceOf (Block::class, $ parentBlock );
293302
294- $ parentBlock = Notion::block ('1d719dd1-563b-4387-b74f-20da92b827fb ' )->append ([$ paragraph , $ bulletedListItem , $ headingOne , $ headingTwo , $ headingThree , $ numberedListItem , $ toDo , $ toggle , $ embed , $ image , $ video , $ pdf ]);
303+ $ parentBlock = Notion::block ('1d719dd1-563b-4387-b74f-20da92b827fb ' )->append ($ quote );
304+ $ this ->assertInstanceOf (Block::class, $ parentBlock );
305+
306+ $ parentBlock = Notion::block ('1d719dd1-563b-4387-b74f-20da92b827fb ' )->append ([$ paragraph , $ bulletedListItem , $ headingOne , $ headingTwo , $ headingThree , $ numberedListItem , $ toDo , $ toggle , $ embed , $ image , $ video , $ pdf , $ quote ]);
295307 $ this ->assertInstanceOf (Block::class, $ parentBlock );
296308 }
297309
@@ -309,6 +321,7 @@ public function classProvider(): array
309321 [Paragraph::class],
310322 [ToDo::class],
311323 [Toggle::class],
324+ [Quote::class],
312325 ];
313326 }
314327
@@ -322,7 +335,7 @@ public function classProvider(): array
322335 public function it_throws_an_handling_exception_for_wrong_type ($ entityClass )
323336 {
324337 $ this ->expectException (HandlingException::class);
325- $ paragraph = $ entityClass ::create (new \stdClass ());
338+ $ entityClass ::create (new \stdClass ());
326339 }
327340
328341 /** @test */
0 commit comments