getChannelByName() public method

public getChannelByName ( $username, $optionalParams = false, $part = ['id', 'snippet', 'contentDetails', 'statistics', 'invideoPromotion'] ) : StdClass
$username
return StdClass
 public function testGetChannelByName()
 {
     $response = $this->youtube->getChannelByName('Google');
     $this->assertEquals('youtube#channel', $response->kind);
     //This is not a safe Assertion because the name can change, but include it anyway
     $this->assertEquals('Google', $response->snippet->title);
     //add all these assertions here in case the api is changed,
     //we can detect it instantly
     $this->assertObjectHasAttribute('snippet', $response);
     $this->assertObjectHasAttribute('contentDetails', $response);
     $this->assertObjectHasAttribute('statistics', $response);
 }