ContactOrganizationTest.php 781 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. namespace CMText\RichContent\Common;
  3. use PHPUnit\Framework\TestCase;
  4. class ContactOrganizationTest extends TestCase
  5. {
  6. public function testJsonSerialize()
  7. {
  8. $this->assertJson( json_encode(new ContactOrganization()) );
  9. }
  10. public function test__construct()
  11. {
  12. // empty
  13. $this->assertInstanceOf(
  14. ContactOrganization::class,
  15. new ContactOrganization()
  16. );
  17. // partial
  18. $this->assertInstanceOf(
  19. ContactOrganization::class,
  20. new ContactOrganization('CM.com', 'Development')
  21. );
  22. // full
  23. $this->assertInstanceOf(
  24. ContactOrganization::class,
  25. new ContactOrganization('CM.com', 'Development', 'Developer')
  26. );
  27. }
  28. }