public function testEnvironment() { $this->client->setEnviroment(Client::ENVIRONMENT_TESTING); $this->assertEquals(Client::ENVIRONMENT_TESTING, $this->client->getEnviroment()); $this->client->setEnviroment(Client::ENVIRONMENT_PRODUCTION); $this->assertEquals(Client::ENVIRONMENT_PRODUCTION, $this->client->getEnviroment()); try { $this->client->setEnviroment('foo'); $this->fail('Invalid environment could be set'); } catch (Exception $exception) { } }
public function setUp() { $this->client = new Client(self::MERCHANT_ID, self::MERCHANT_KEY); $this->client->setEnviroment(Client::ENVIRONMENT_TESTING); }