Skip to content

Commit

Permalink
Update env name in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
shesek committed Dec 29, 2017
1 parent 1ee2216 commit 3ec2a0d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions test.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);

Expand All @@ -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/'));
}
Expand Down

0 comments on commit 3ec2a0d

Please sign in to comment.