TestPatch.php 627 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. require_once('TestAutoLoad.php');
  3. use Culqi\Culqi;
  4. /**
  5. * Test Patch
  6. */
  7. class TestPatch extends PHPUnit_Framework_TestCase
  8. {
  9. protected $API_KEY;
  10. protected function setUp() {
  11. $this->API_KEY = getenv("API_KEY");
  12. $this->culqi = new Culqi(array("api_key" => $this->API_KEY ));
  13. }
  14. public function testUpdatePlan() {
  15. $plan = $this->culqi->Plans->update("pln_test_pLFzcWkwj33xFGF1",
  16. array(
  17. "metadata" => array(
  18. "test" => "test555"
  19. )
  20. )
  21. );
  22. $this->assertEquals('plan', $plan->object);
  23. }
  24. }