for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace MaxBeckers\AmazonAlexa\Test\Helper;
use MaxBeckers\AmazonAlexa\Helper\PropertyHelper;
use PHPUnit\Framework\TestCase;
class PropertyHelperTest extends TestCase
{
public function testCheckNullValueStringSuccess(): void
$key = 'test';
$value = 'me';
$data = [
$key => $value,
];
$this->assertEquals(
$value,
PropertyHelper::checkNullValueString($data, $key)
);
}
public function testCheckNullValueStringUnset(): void
$this->assertNull(PropertyHelper::checkNullValueString($data, 'unset'));
public function testCheckNullValueIntSuccess(): void
$value = 132;
PropertyHelper::checkNullValueInt($data, $key)
public function testCheckNullValueIntUnset(): void
$value = 123;
$this->assertNull(PropertyHelper::checkNullValueInt($data, 'unset'));