@@ -253,6 +253,7 @@ public function it_assembles_properties_for_a_new_page()
253253 $ this ->assertInstanceOf (Email::class, $ mailProp );
254254 $ this ->assertEquals ($ emailValue , $ mailProp ->getContent ());
255255 $ this ->assertEquals ($ emailValue , $ mailProp ->getEmail ());
256+ $ this ->assertEquals ($ emailValue , $ mailProp ->asText ());
256257 $ mailContent = $ mailProp ->getRawContent ();
257258 $ this ->assertArrayHasKey ('email ' , $ mailContent );
258259 $ this ->assertEquals ($ mailContent ['email ' ], $ emailValue );
@@ -279,6 +280,7 @@ public function it_assembles_properties_for_a_new_page()
279280 $ numberProp = $ page ->getProperty ($ numberKey );
280281 $ this ->assertEquals ($ numberValue , $ numberProp ->getContent ());
281282 $ this ->assertEquals ($ numberValue , $ numberProp ->getNumber ());
283+ $ this ->assertEquals ($ numberValue , $ numberProp ->asText ());
282284 $ numberContent = $ numberProp ->getRawContent ();
283285 $ this ->assertArrayHasKey ('number ' , $ numberContent );
284286 $ this ->assertEquals ($ numberContent ['number ' ], $ numberValue );
@@ -306,6 +308,7 @@ public function it_assembles_properties_for_a_new_page()
306308 $ phoneProp = $ page ->getProperty ($ phoneKey );
307309 $ this ->assertEquals ($ phoneValue , $ phoneProp ->getPhoneNumber ());
308310 $ this ->assertEquals ($ phoneProp ->getContent (), $ phoneProp ->getPhoneNumber ());
311+ $ this ->assertEquals ($ phoneProp ->getContent (), $ phoneProp ->asText ());
309312 $ phoneContent = $ phoneProp ->getRawContent ();
310313 $ this ->assertArrayHasKey ('phone_number ' , $ phoneContent );
311314 $ this ->assertEquals ($ phoneContent ['phone_number ' ], $ phoneValue );
@@ -335,6 +338,7 @@ public function it_assembles_properties_for_a_new_page()
335338 $ textProp = $ page ->getProperty ($ textKey );
336339 $ this ->assertInstanceOf (RichText::class, $ textProp ->getContent ());
337340 $ this ->assertEquals ($ textValue , $ textProp ->getContent ()->getPlainText ());
341+ $ this ->assertEquals ($ textValue , $ textProp ->asText ());
338342 $ textContent = $ textProp ->getRawContent ();
339343 $ this ->assertArrayHasKey ('rich_text ' , $ textContent );
340344 $ this ->assertCount (1 , $ textContent ['rich_text ' ]);
@@ -349,6 +353,7 @@ public function it_assembles_properties_for_a_new_page()
349353 $ urlProp = $ page ->getProperty ($ urlKey );
350354 $ this ->assertEquals ($ urlValue , $ urlProp ->getUrl ());
351355 $ this ->assertEquals ($ urlProp ->getContent (), $ urlProp ->getUrl ());
356+ $ this ->assertEquals ($ urlProp ->getContent (), $ urlProp ->asText ());
352357 $ urlContent = $ urlProp ->getRawContent ();
353358 $ this ->assertArrayHasKey ('url ' , $ urlContent );
354359 $ this ->assertEquals ($ urlValue , $ urlContent ['url ' ]);
0 commit comments