From 3ec2a0dc489bfd35b411c3880af878abea14a2d1 Mon Sep 17 00:00:00 2001 From: Nadav Ivgi Date: Fri, 29 Dec 2017 21:57:07 +0200 Subject: [PATCH] Update env name in tests --- README.md | 2 +- test.php | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index b8d714e..7e33415 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ TODO: document missing methods ## Test ```bash -$ STRIKE_URL=http://api-token:[TOKEN]@localhost:8009 phpunit test +$ CHARGE_URL=http://api-token:[TOKEN]@localhost:8009 phpunit test ``` ## License diff --git a/test.php b/test.php index 2c27808..b29c4d3 100644 --- a/test.php +++ b/test.php @@ -4,7 +4,7 @@ class LightningChargeClientTest extends \PHPUnit\Framework\TestCase { public function test_create_invoice(){ - $charge = new LightningChargeClient(getenv('STRIKE_URL')); + $charge = new LightningChargeClient(getenv('CHARGE_URL')); $invoice = $charge->invoice([ 'msatoshi' => 50, 'metadata' => [ 'customer' => 'Satoshi', 'products' => [ 'potato', 'chips' ] ] ]); $this->assertObjectHasAttribute('id', $invoice); @@ -16,7 +16,7 @@ public function test_create_invoice(){ } public function test_fetch_invoice(){ - $charge = new LightningChargeClient(getenv('STRIKE_URL')); + $charge = new LightningChargeClient(getenv('CHARGE_URL')); $saved = $charge->invoice( [ 'msatoshi' => 50, 'metadata' => 'test_fetch_invoice' ]); $loaded = $charge->fetch($saved->id); @@ -27,7 +27,7 @@ public function test_fetch_invoice(){ } public function test_register_webhook(){ - $charge = new LightningChargeClient(getenv('STRIKE_URL')); + $charge = new LightningChargeClient(getenv('CHARGE_URL')); $invoice = $charge->invoice([ 'msatoshi' => 50 ]); $this->assertTrue($charge->registerHook($invoice->id, 'http://example.com/')); }