-
Notifications
You must be signed in to change notification settings - Fork 346
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20 from RajeshGogo/revert-15-classroom-snippets
Revert "Classroom Unit Test"
- Loading branch information
Showing
8 changed files
with
110 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,12 +20,25 @@ | |
|
||
class ClassroomAddTeacherTest extends \PHPUnit\Framework\TestCase | ||
{ | ||
|
||
protected function getService() | ||
{ | ||
$client = new Google\Client(); | ||
$client->useApplicationDefaultCredentials(); | ||
$client->addScope("https://www.googleapis.com/auth/classroom.courses"); | ||
$service = new Google_Service_Classroom($client); | ||
return $service; | ||
} | ||
|
||
public function testcreateCourseAlias() | ||
|
||
{ | ||
$classroomResponse = addTeacher('531365794650','[email protected]'); | ||
|
||
$service = $this->getService(); | ||
$classroomResponse = addTeacher($service, '531365794650' ,'[email protected]'); | ||
$this->assertNotNull($classroomResponse, "Not get any value from service"); | ||
|
||
} | ||
|
||
|
||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,10 +20,23 @@ | |
|
||
class ClassroomEnrollAsStudentTest extends \PHPUnit\Framework\TestCase | ||
{ | ||
protected function getService() | ||
{ | ||
$client = new Google\Client(); | ||
$client->useApplicationDefaultCredentials(); | ||
$client->addScope("https://www.googleapis.com/auth/classroom.courses"); | ||
$service = new Google_Service_Classroom($client); | ||
return $service; | ||
} | ||
|
||
public function testcreateCourseAlias() | ||
|
||
{ | ||
$classroomResponse = enrollAsStudent( '123456','abcdef'); | ||
|
||
$service = $this->getService(); | ||
$classroomResponse = enrollAsStudent($service, '531365794650' ,'[email protected]'); | ||
$this->assertNotNull($classroomResponse, "Not get any value from service"); | ||
|
||
} | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters