for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace SergeyNezbritskiy\NovaPoshta\Tests\Integration\Models\Common;
use PHPUnit\Framework\TestCase;
use SergeyNezbritskiy\NovaPoshta\Models\Common;
use SergeyNezbritskiy\NovaPoshta\NovaPoshtaApiException;
use SergeyNezbritskiy\NovaPoshta\Tests\AssertEntityByPropertiesTrait;
use SergeyNezbritskiy\NovaPoshta\Tests\ConstantsInterface;
use SergeyNezbritskiy\NovaPoshta\Tests\UsesConnectionTrait;
class GetTimeIntervalsTest extends TestCase implements ConstantsInterface
{
use AssertEntityByPropertiesTrait;
use UsesConnectionTrait;
private Common $model;
protected function setUp(): void
$connection = $this->getConnection();
$this->model = new Common($connection);
}
/**
* @return void
* @throws NovaPoshtaApiException
*/
public function testGetTimeIntervals(): void
$actualResult = $this->model->getTimeIntervals(self::CITY_REF);
$this->assertNotEmpty($actualResult);
$entity = array_shift($actualResult);
$expectedKeys = [
'Number',
'Start',
'End',
];
$this->assertEntity($entity, $expectedKeys);