diff --git a/SilMock/tests/Google/Service/DirectoryTest.php b/SilMock/tests/Google/Service/DirectoryTest.php index e8295c4..9897a9f 100644 --- a/SilMock/tests/Google/Service/DirectoryTest.php +++ b/SilMock/tests/Google/Service/DirectoryTest.php @@ -2,9 +2,12 @@ namespace SilMock\tests\Google\Service; +use Google\Client; +use Google\Service\Directory\Alias as Google_Service_Directory_Alias; +use Google\Service\Directory\User as Google_Service_Directory_User; +use PHPUnit\Framework\Assert; use PHPUnit\Framework\TestCase; -use Google_Service_Directory_Alias; -use Google_Service_Directory_User; +use SilMock\Google\Http\Batch; use SilMock\Google\Service\Directory; use SilMock\Google\Service\Directory\ObjectUtils; use SilMock\DataStore\Sqlite\SqliteUtils; @@ -43,6 +46,12 @@ public function getProperties($object, $propKeys = null): array return $outArray; } + public function testCreateBatch() + { + $batch = new Batch(); + self::assertInstanceOf(Batch::class, $batch); + } + public function testDirectory() { $expectedKeys = [ @@ -54,7 +63,7 @@ public function testDirectory() ]; $errorMessage = " *** Directory was not initialized properly"; - $directory = new Directory('whatever', $this->dataFile); + $directory = new Directory('anyclient', $this->dataFile); $directoryAsJson = json_encode($directory); $directoryInfo = json_decode($directoryAsJson, true); @@ -64,6 +73,13 @@ public function testDirectory() } } + public function testGetClient() + { + $dir = new Directory('anyclient', $this->dataFile); + $client = $dir->getClient(); + Assert::assertInstanceOf(Client::class, $client); + } + public function testUsersInsert() { $newUser = $this->setupSampleUser($this->dataFile);