/** * Test that a user can subscribe to a pusher channel * * @return void */ public function testCanSubscribeMemberToPusherChannel() { $this->request->shouldReceive('input')->times(3)->andReturn('foo'); $this->pusher->shouldReceive('presence_auth')->once()->with('foo', 'foo', m::type('string'), ['username' => 'foo']); $this->call('POST', 'pusher/auth'); $this->assertResponseOk(); }