diff --git a/lib/Discovery/Cms/Discovery.php b/lib/Discovery/Cms/Discovery.php index 71d31d78..da606e82 100644 --- a/lib/Discovery/Cms/Discovery.php +++ b/lib/Discovery/Cms/Discovery.php @@ -11,6 +11,7 @@ * @method Hubdb\Discovery hubdb() * @method Performance\Discovery performance() * @method SiteSearch\Discovery siteSearch() + * @method SourceCode\Discovery sourceCode() * @method UrlRedirects\Discovery urlRedirects() */ class Discovery extends DiscoveryBase diff --git a/lib/Discovery/Cms/SourceCode/Discovery.php b/lib/Discovery/Cms/SourceCode/Discovery.php new file mode 100644 index 00000000..10d5d8bd --- /dev/null +++ b/lib/Discovery/Cms/SourceCode/Discovery.php @@ -0,0 +1,21 @@ +hubdb()->shouldHaveType(\HubSpot\Discovery\Cms\Hubdb\Discovery::class); $this->performance()->shouldHaveType(\HubSpot\Discovery\Cms\Performance\Discovery::class); $this->siteSearch()->shouldHaveType(\HubSpot\Discovery\Cms\SiteSearch\Discovery::class); + $this->sourceCode()->shouldHaveType(\HubSpot\Discovery\Cms\SourceCode\Discovery::class); $this->urlRedirects()->shouldHaveType(\HubSpot\Discovery\Cms\UrlRedirects\Discovery::class); } } diff --git a/tests/spec/Discovery/Cms/SourceCode/DiscoverySpec.php b/tests/spec/Discovery/Cms/SourceCode/DiscoverySpec.php new file mode 100644 index 00000000..540d6562 --- /dev/null +++ b/tests/spec/Discovery/Cms/SourceCode/DiscoverySpec.php @@ -0,0 +1,34 @@ +beConstructedWith($client, $config); + } + + public function it_is_initializable() + { + $this->shouldHaveType(\HubSpot\Discovery\Cms\SourceCode\Discovery::class); + } + + public function it_creates_clients() + { + $this->contentApi()->shouldHaveType(ContentApi::class); + $this->extractApi()->shouldHaveType(ExtractApi::class); + $this->metadataApi()->shouldHaveType(MetadataApi::class); + $this->sourceCodeExtractApi()->shouldHaveType(SourceCodeExtractApi::class); + $this->validationApi()->shouldHaveType(ValidationApi::class); + } +} diff --git a/tests/spec/Discovery/Crm/Objects/Calls/DiscoverySpec.php b/tests/spec/Discovery/Crm/Objects/Calls/DiscoverySpec.php new file mode 100644 index 00000000..10de9f2d --- /dev/null +++ b/tests/spec/Discovery/Crm/Objects/Calls/DiscoverySpec.php @@ -0,0 +1,33 @@ +beConstructedWith($client, $config); + } + + public function it_is_initializable() + { + $this->shouldHaveType(Discovery::class); + } + + public function it_creates_clients() + { + $this->associationsApi()->shouldHaveType(AssociationsApi::class); + $this->basicApi()->shouldHaveType(BasicApi::class); + $this->batchApi()->shouldHaveType(BatchApi::class); + $this->searchApi()->shouldHaveType(SearchApi::class); + } +} diff --git a/tests/spec/Discovery/Crm/Objects/DiscoverySpec.php b/tests/spec/Discovery/Crm/Objects/DiscoverySpec.php index 390469d1..edec7d17 100644 --- a/tests/spec/Discovery/Crm/Objects/DiscoverySpec.php +++ b/tests/spec/Discovery/Crm/Objects/DiscoverySpec.php @@ -9,8 +9,13 @@ use HubSpot\Client\Crm\Objects\Api\GDPRApi; use HubSpot\Client\Crm\Objects\Api\SearchApi; use HubSpot\Config; +use HubSpot\Discovery\Crm\Objects\Calls\Discovery as CallsDiscovery; use HubSpot\Discovery\Crm\Objects\Discovery; +use HubSpot\Discovery\Crm\Objects\Emails\Discovery as EmailsDiscovery; use HubSpot\Discovery\Crm\Objects\FeedbackSubmissions\Discovery as FeedbackSubmissionsDiscovery; +use HubSpot\Discovery\Crm\Objects\Meetings\Discovery as MeetingsDiscovery; +use HubSpot\Discovery\Crm\Objects\Notes\Discovery as NotesDiscovery; +use HubSpot\Discovery\Crm\Objects\Tasks\Discovery as TasksDiscovery; use PhpSpec\ObjectBehavior; class DiscoverySpec extends ObjectBehavior @@ -30,8 +35,13 @@ public function it_creates_clients() $this->associationsApi()->shouldHaveType(AssociationsApi::class); $this->basicApi()->shouldHaveType(BasicApi::class); $this->batchApi()->shouldHaveType(BatchApi::class); + $this->calls()->shouldHaveType(CallsDiscovery::class); $this->gdprApi()->shouldHaveType(GDPRApi::class); + $this->emails()->shouldHaveType(EmailsDiscovery::class); $this->feedbackSubmissions()->shouldHaveType(FeedbackSubmissionsDiscovery::class); + $this->meetings()->shouldHaveType(MeetingsDiscovery::class); + $this->notes()->shouldHaveType(NotesDiscovery::class); $this->searchApi()->shouldHaveType(SearchApi::class); + $this->tasks()->shouldHaveType(TasksDiscovery::class); } } diff --git a/tests/spec/Discovery/Crm/Objects/Emails/DiscoverySpec.php b/tests/spec/Discovery/Crm/Objects/Emails/DiscoverySpec.php new file mode 100644 index 00000000..685dd56a --- /dev/null +++ b/tests/spec/Discovery/Crm/Objects/Emails/DiscoverySpec.php @@ -0,0 +1,33 @@ +beConstructedWith($client, $config); + } + + public function it_is_initializable() + { + $this->shouldHaveType(Discovery::class); + } + + public function it_creates_clients() + { + $this->associationsApi()->shouldHaveType(AssociationsApi::class); + $this->basicApi()->shouldHaveType(BasicApi::class); + $this->batchApi()->shouldHaveType(BatchApi::class); + $this->searchApi()->shouldHaveType(SearchApi::class); + } +} diff --git a/tests/spec/Discovery/Crm/Objects/Meetings/DiscoverySpec.php b/tests/spec/Discovery/Crm/Objects/Meetings/DiscoverySpec.php new file mode 100644 index 00000000..36d3370b --- /dev/null +++ b/tests/spec/Discovery/Crm/Objects/Meetings/DiscoverySpec.php @@ -0,0 +1,33 @@ +beConstructedWith($client, $config); + } + + public function it_is_initializable() + { + $this->shouldHaveType(Discovery::class); + } + + public function it_creates_clients() + { + $this->associationsApi()->shouldHaveType(AssociationsApi::class); + $this->basicApi()->shouldHaveType(BasicApi::class); + $this->batchApi()->shouldHaveType(BatchApi::class); + $this->searchApi()->shouldHaveType(SearchApi::class); + } +} diff --git a/tests/spec/Discovery/Crm/Objects/Notes/DiscoverySpec.php b/tests/spec/Discovery/Crm/Objects/Notes/DiscoverySpec.php new file mode 100644 index 00000000..b583e0de --- /dev/null +++ b/tests/spec/Discovery/Crm/Objects/Notes/DiscoverySpec.php @@ -0,0 +1,33 @@ +beConstructedWith($client, $config); + } + + public function it_is_initializable() + { + $this->shouldHaveType(Discovery::class); + } + + public function it_creates_clients() + { + $this->associationsApi()->shouldHaveType(AssociationsApi::class); + $this->basicApi()->shouldHaveType(BasicApi::class); + $this->batchApi()->shouldHaveType(BatchApi::class); + $this->searchApi()->shouldHaveType(SearchApi::class); + } +} diff --git a/tests/spec/Discovery/Crm/Objects/Tasks/DiscoverySpec.php b/tests/spec/Discovery/Crm/Objects/Tasks/DiscoverySpec.php new file mode 100644 index 00000000..c1004613 --- /dev/null +++ b/tests/spec/Discovery/Crm/Objects/Tasks/DiscoverySpec.php @@ -0,0 +1,33 @@ +beConstructedWith($client, $config); + } + + public function it_is_initializable() + { + $this->shouldHaveType(Discovery::class); + } + + public function it_creates_clients() + { + $this->associationsApi()->shouldHaveType(AssociationsApi::class); + $this->basicApi()->shouldHaveType(BasicApi::class); + $this->batchApi()->shouldHaveType(BatchApi::class); + $this->searchApi()->shouldHaveType(SearchApi::class); + } +} diff --git a/tests/spec/Discovery/DiscoverySpec.php b/tests/spec/Discovery/DiscoverySpec.php index 0429d1cf..af276d2f 100644 --- a/tests/spec/Discovery/DiscoverySpec.php +++ b/tests/spec/Discovery/DiscoverySpec.php @@ -29,6 +29,7 @@ public function it_creates_clients() $this->events()->shouldHaveType(\HubSpot\Discovery\Events\Discovery::class); $this->files()->shouldHaveType(\HubSpot\Discovery\Files\Discovery::class); $this->marketing()->shouldHaveType(\HubSpot\Discovery\Marketing\Discovery::class); + $this->settings()->shouldHaveType(\HubSpot\Discovery\Settings\Discovery::class); $this->webhooks()->shouldHaveType(\HubSpot\Discovery\Webhooks\Discovery::class); } } diff --git a/tests/spec/Discovery/Marketing/Events/DiscoverySpec.php b/tests/spec/Discovery/Marketing/Events/DiscoverySpec.php new file mode 100644 index 00000000..a0218a45 --- /dev/null +++ b/tests/spec/Discovery/Marketing/Events/DiscoverySpec.php @@ -0,0 +1,34 @@ +beConstructedWith($client, $config); + } + + public function it_is_initializable() + { + $this->shouldHaveType(\HubSpot\Discovery\Marketing\Events\Discovery::class); + } + + public function it_creates_clients() + { + $this->basicApi()->shouldHaveType(BasicApi::class); + $this->batchApi()->shouldHaveType(BatchApi::class); + $this->searchApi()->shouldHaveType(SearchApi::class); + $this->settingsApi()->shouldHaveType(SettingsApi::class); + $this->subscriberStateChangesApi()->shouldHaveType(SubscriberStateChangesApi::class); + } +} diff --git a/tests/spec/Discovery/Settings/DiscoverySpec.php b/tests/spec/Discovery/Settings/DiscoverySpec.php new file mode 100644 index 00000000..495e38c0 --- /dev/null +++ b/tests/spec/Discovery/Settings/DiscoverySpec.php @@ -0,0 +1,25 @@ +beConstructedWith($client, $config); + } + + public function it_is_initializable() + { + $this->shouldHaveType(\HubSpot\Discovery\Settings\Discovery::class); + } + + public function it_creates_clients() + { + $this->users()->shouldHaveType(\HubSpot\Discovery\Settings\Users\Discovery::class); + } +} diff --git a/tests/spec/Discovery/Settings/Users/DiscoverySpec.php b/tests/spec/Discovery/Settings/Users/DiscoverySpec.php new file mode 100644 index 00000000..1a37c29a --- /dev/null +++ b/tests/spec/Discovery/Settings/Users/DiscoverySpec.php @@ -0,0 +1,30 @@ +beConstructedWith($client, $config); + } + + public function it_is_initializable() + { + $this->shouldHaveType(\HubSpot\Discovery\Settings\Users\Discovery::class); + } + + public function it_creates_clients() + { + $this->rolesApi()->shouldHaveType(RolesApi::class); + $this->teamsApi()->shouldHaveType(TeamsApi::class); + $this->usersApi()->shouldHaveType(UsersApi::class); + } +}