Skip to content

Commit

Permalink
IOS group&collapse parameters (#115)
Browse files Browse the repository at this point in the history
* IOS group&collapse parameters

* Fix style issue
  • Loading branch information
laimonas authored and norkunas committed Mar 3, 2019
1 parent 5c56a6a commit 8712a0b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/Resolver/NotificationResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,12 @@ public function resolve(array $data)
->setAllowedTypes('adm_group', 'string')
->setDefined('adm_group_message')
->setAllowedTypes('adm_group_message', 'array')
->setDefined('thread_id')
->setAllowedTypes('thread_id', 'string')
->setDefined('summary_arg')
->setAllowedTypes('summary_arg', 'string')
->setDefined('summary_arg_count')
->setAllowedTypes('summary_arg_count', 'int')
->setDefined('ttl')
->setAllowedTypes('ttl', 'int')
->setDefined('priority')
Expand Down
5 changes: 4 additions & 1 deletion tests/OneSignal/Tests/Resolver/NotificationResolverTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
use OneSignal\Resolver\NotificationResolver;
use OneSignal\Tests\ConfigMockerTrait;
use OneSignal\Tests\PrivateAccessorTrait;
use Symfony\Component\OptionsResolver\OptionsResolver;
use PHPUnit\Framework\TestCase;
use Symfony\Component\OptionsResolver\OptionsResolver;

class NotificationResolverTest extends TestCase
{
Expand Down Expand Up @@ -103,6 +103,9 @@ public function testResolveWithValidValues()
'android_group_message' => ['value'],
'adm_group' => 'value',
'adm_group_message' => ['value'],
'thread_id' => 'value',
'summary_arg' => 'value',
'summary_arg_count' => 10,
'ttl' => 23,
'priority' => 10,
'app_id' => 'value',
Expand Down

0 comments on commit 8712a0b

Please sign in to comment.