/** @test */ public function editProfile() { $response = $this->createSuccessApiResponse(); $error = $this->createErrorApiResponse(); $this->mock->shouldReceive('exec')->once()->andReturn($response); $this->mock->shouldReceive('exec')->once()->andReturn($error); $params = ['name' => 'name']; $this->assertTrue($this->provider->profile($params)); $this->assertFalse($this->provider->profile($params)); }
/** @test */ public function it_should_get_user_profile_and_send_request_when_deactivating() { $this->apiShouldReturnData(['id' => 1234])->apiShouldReturnSuccess()->assertTrue($this->provider->deactivate()); $this->apiShouldReturnData(['id' => 1234])->apiShouldReturnError()->assertFalse($this->provider->deactivate()); $this->apiShouldReturnSuccess()->assertFalse($this->provider->deactivate()); }