Ejemplo n.º 1
0
 public function testGetCreator()
 {
     $creator = new User($this->client, ['id' => $this->faker->uuid]);
     $channel = new Channel($this->client, ['creator' => $creator->getId()]);
     $this->mockResponse(200, null, ['ok' => true, 'user' => ['id' => $creator->data['id']]]);
     $this->watchPromise($channel->getCreator()->then(function (User $user) use($creator) {
         $this->assertEquals($creator->data, $user->data);
     }));
 }