예제 #1
0
 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) {
     }
 }
예제 #2
0
 public function setUp()
 {
     $this->client = new Client(self::MERCHANT_ID, self::MERCHANT_KEY);
     $this->client->setEnviroment(Client::ENVIRONMENT_TESTING);
 }