Skip to content

Commit

Permalink
FCM: Update to latest Lunr.Halo
Browse files Browse the repository at this point in the history
  • Loading branch information
pprkut committed Jan 31, 2025
1 parent 782250b commit e538e61
Show file tree
Hide file tree
Showing 26 changed files with 173 additions and 173 deletions.
4 changes: 2 additions & 2 deletions src/Lunr/Vortex/FCM/Tests/FCMAndroidPayloadBaseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*
* @covers Lunr\Vortex\FCM\FCMAndroidPayload
*/
class FCMAndroidPayloadBaseTest extends FCMAndroidPayloadTest
class FCMAndroidPayloadBaseTest extends FCMAndroidPayloadTestCase
{

/**
Expand All @@ -34,7 +34,7 @@ public function testElementsIsInitializedWithEmptyArray(): void
*/
public function testGetPayloadReturnsElementsArray(): void
{
$this->set_reflection_property_value('elements', $this->payload);
$this->setReflectionPropertyValue('elements', $this->payload);

$this->assertSame($this->payload, $this->class->get_payload());
}
Expand Down
18 changes: 9 additions & 9 deletions src/Lunr/Vortex/FCM/Tests/FCMAndroidPayloadSetTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*
* @covers \Lunr\Vortex\FCM\FCMAndroidPayload
*/
class FCMAndroidPayloadSetTest extends FCMAndroidPayloadTest
class FCMAndroidPayloadSetTest extends FCMAndroidPayloadTestCase
{

/**
Expand All @@ -29,7 +29,7 @@ public function testSetCollapseKey(): void
{
$this->class->set_collapse_key('test');

$value = $this->get_reflection_property_value('elements');
$value = $this->getReflectionPropertyValue('elements');
$this->assertArrayHasKey('collapse_key', $value);
$this->assertEquals('test', $value['collapse_key']);
}
Expand All @@ -53,7 +53,7 @@ public function testSetTimeToLive(): void
{
$this->class->set_time_to_live(5);

$value = $this->get_reflection_property_value('elements');
$value = $this->getReflectionPropertyValue('elements');

$this->assertArrayHasKey('ttl', $value);
$this->assertEquals('5s', $value['ttl']);
Expand All @@ -78,7 +78,7 @@ public function testSetPriority(): void
{
$this->class->set_priority(FCMAndroidPriority::Normal);

$value = $this->get_reflection_property_value('elements');
$value = $this->getReflectionPropertyValue('elements');

$this->assertArrayHasKey('priority', $value);
$this->assertEquals('NORMAL', $value['priority']);
Expand All @@ -103,7 +103,7 @@ public function testSetCategory()
{
$this->class->set_category('category');

$value = $this->get_reflection_property_value('elements');
$value = $this->getReflectionPropertyValue('elements');

$this->assertArrayHasKey('notification', $value);
$this->assertArrayHasKey('click_action', $value['notification']);
Expand All @@ -129,7 +129,7 @@ public function testSetTag()
{
$this->class->set_tag('tag');

$value = $this->get_reflection_property_value('elements');
$value = $this->getReflectionPropertyValue('elements');

$this->assertArrayHasKey('notification', $value);
$this->assertArrayHasKey('tag', $value['notification']);
Expand All @@ -155,7 +155,7 @@ public function testSetColor()
{
$this->class->set_color('red');

$value = $this->get_reflection_property_value('elements');
$value = $this->getReflectionPropertyValue('elements');

$this->assertArrayHasKey('notification', $value);
$this->assertArrayHasKey('color', $value['notification']);
Expand All @@ -181,7 +181,7 @@ public function testSetIcon()
{
$this->class->set_icon('icon');

$value = $this->get_reflection_property_value('elements');
$value = $this->getReflectionPropertyValue('elements');

$this->assertArrayHasKey('notification', $value);
$this->assertArrayHasKey('icon', $value['notification']);
Expand All @@ -207,7 +207,7 @@ public function testSetSound()
{
$this->class->set_sound('sound');

$value = $this->get_reflection_property_value('elements');
$value = $this->getReflectionPropertyValue('elements');

$this->assertArrayHasKey('notification', $value);
$this->assertArrayHasKey('sound', $value['notification']);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<?php

/**
* This file contains the FCMAndroidPayloadTest class.
* This file contains the FCMAndroidPayloadTestCase class.
*
* SPDX-FileCopyrightText: Copyright 2024 Move Agency Group B.V., Zwolle, The Netherlands
* SPDX-License-Identifier: MIT
*/

namespace Lunr\Vortex\FCM\Tests;

use Lunr\Halo\LunrBaseTest;
use Lunr\Halo\LunrBaseTestCase;
use Lunr\Vortex\FCM\FCMAndroidPayload;
use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\MockObject\Stub;
Expand All @@ -20,7 +20,7 @@
*
* @covers Lunr\Vortex\FCM\FCMAndroidPayload
*/
abstract class FCMAndroidPayloadTest extends LunrBaseTest
abstract class FCMAndroidPayloadTestCase extends LunrBaseTestCase
{

/**
Expand Down
4 changes: 2 additions & 2 deletions src/Lunr/Vortex/FCM/Tests/FCMApnsPayloadBaseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*
* @covers Lunr\Vortex\FCM\FCMApnsPayload
*/
class FCMApnsPayloadBaseTest extends FCMApnsPayloadTest
class FCMApnsPayloadBaseTest extends FCMApnsPayloadTestCase
{

/**
Expand All @@ -32,7 +32,7 @@ public function testElementsIsInitializedWithEmptyArray(): void
*/
public function testGetPayloadReturnsElementsArray(): void
{
$this->set_reflection_property_value('elements', $this->payload);
$this->setReflectionPropertyValue('elements', $this->payload);

$this->assertSame($this->payload, $this->class->get_payload());
}
Expand Down
14 changes: 7 additions & 7 deletions src/Lunr/Vortex/FCM/Tests/FCMApnsPayloadSetTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*
* @covers \Lunr\Vortex\FCM\FCMApnsPayload
*/
class FCMApnsPayloadSetTest extends FCMApnsPayloadTest
class FCMApnsPayloadSetTest extends FCMApnsPayloadTestCase
{

/**
Expand All @@ -27,7 +27,7 @@ public function testSetCollapseKey(): void
{
$this->class->set_collapse_key('test');

$value = $this->get_reflection_property_value('elements');
$value = $this->getReflectionPropertyValue('elements');

$this->assertArrayHasKey('headers', $value);
$this->assertArrayHasKey('apns-collapse-id', $value['headers']);
Expand All @@ -53,7 +53,7 @@ public function testSetContentAvailable(): void
{
$this->class->set_content_available(TRUE);

$value = $this->get_reflection_property_value('elements');
$value = $this->getReflectionPropertyValue('elements');

$this->assertArrayHasKey('payload', $value);
$this->assertArrayHasKey('aps', $value['payload']);
Expand All @@ -80,7 +80,7 @@ public function testSetMutableContent(): void
{
$this->class->set_mutable_content(TRUE);

$value = $this->get_reflection_property_value('elements');
$value = $this->getReflectionPropertyValue('elements');

$this->assertArrayHasKey('payload', $value);
$this->assertArrayHasKey('aps', $value['payload']);
Expand Down Expand Up @@ -130,7 +130,7 @@ public function testSetPriority(string $priority, int $expected): void
{
$this->class->set_priority($priority);

$value = $this->get_reflection_property_value('elements');
$value = $this->getReflectionPropertyValue('elements');

$this->assertArrayHasKey('headers', $value);
$this->assertArrayHasKey('apns-priority', $value['headers']);
Expand All @@ -156,7 +156,7 @@ public function testSetCategory()
{
$this->class->set_category('category');

$value = $this->get_reflection_property_value('elements');
$value = $this->getReflectionPropertyValue('elements');

$this->assertArrayHasKey('payload', $value);
$this->assertArrayHasKey('aps', $value['payload']);
Expand All @@ -183,7 +183,7 @@ public function testSetSound()
{
$this->class->set_sound('sound');

$value = $this->get_reflection_property_value('elements');
$value = $this->getReflectionPropertyValue('elements');

$this->assertArrayHasKey('payload', $value);
$this->assertArrayHasKey('aps', $value['payload']);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<?php

/**
* This file contains the FCMApnsPayloadTest class.
* This file contains the FCMApnsPayloadTestCase class.
*
* SPDX-FileCopyrightText: Copyright 2024 Move Agency Group B.V., Zwolle, The Netherlands
* SPDX-License-Identifier: MIT
*/

namespace Lunr\Vortex\FCM\Tests;

use Lunr\Halo\LunrBaseTest;
use Lunr\Halo\LunrBaseTestCase;
use Lunr\Vortex\FCM\FCMApnsPayload;
use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\MockObject\Stub;
Expand All @@ -20,7 +20,7 @@
*
* @covers Lunr\Vortex\FCM\FCMApnsPayload
*/
abstract class FCMApnsPayloadTest extends LunrBaseTest
abstract class FCMApnsPayloadTestCase extends LunrBaseTestCase
{

/**
Expand Down
Loading

0 comments on commit e538e61

Please sign in to comment.