Skip to content

Commit

Permalink
Works for normal arrays too
Browse files Browse the repository at this point in the history
  • Loading branch information
richardm-stripe committed May 15, 2020
1 parent 76ecf45 commit d5bda98
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/Stripe/Service/AbstractServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,5 +68,11 @@ public function testFormatParams()
static::assertTrue('' === $result['foo']['bar']);
static::assertTrue(null !== $result['foo']['bar']);
static::assertTrue(1 === $result['foo']['baz']);

$result = \Stripe\Service\AbstractService::formatParams(['foo' => ["bar", null, null, "baz"]]);
static::assertTrue('bar' === $result['foo'][0]);
static::assertTrue('' === $result['foo'][1]);
static::assertTrue('' === $result['foo'][2]);
static::assertTrue('baz' === $result['foo'][3]);
}
}

0 comments on commit d5bda98

Please sign in to comment.