/** * @test */ public function sets_currency_and_checks_if_it_matches() { $config = new Config($this->config); $provider = m::mock('SSD\\Currency\\Providers\\CookieProvider', [$config, Request::capture()]); $provider->shouldReceive('set')->with('usd'); $provider->shouldReceive('is')->andReturn(true); $currency = new Currency($provider); $currency->set('usd'); $this->assertTrue($currency->is('usd')); }