Удалён метод AtolOnline\Entities\Kkt::getNetworkError() за ненадобностью

This commit is contained in:
Anthony Axenov 2021-11-21 18:57:20 +08:00
parent 95499174b0
commit d281071970
2 changed files with 0 additions and 30 deletions

View File

@ -126,19 +126,6 @@ final class Kkt extends Entity
return $this->data->$name;
}
/**
* Возвращает объект с информацией о сетевой ошибке
*
* @return object
*/
public function getNetworkError(): object
{
return (object)[
'code' => $this->data->networkErrorCode,
'text' => self::ERROR_CODES[$this->data->networkErrorCode],
];
}
/**
* @inheritDoc
*/

View File

@ -133,21 +133,4 @@ class KktEntityTest extends BasicTestCase
$this->expectException(Exception::class);
(new Kkt((object)$this->sample_data))->firstUnsetDocTimestamp;
}
/**
* Тестирует получение данных о сетевой ошибке
*
* @covers \AtolOnline\Entities\Kkt::getNetworkError
* @throws EmptyMonitorDataException
* @throws NotEnoughMonitorDataException
*/
public function testGetNetworkError(): void
{
$kkt = new Kkt((object)$this->sample_data);
$this->assertIsObject($kkt->getNetworkError());
$this->assertEquals((object)[
'code' => $kkt->networkErrorCode,
'text' => $kkt::ERROR_CODES[$kkt->networkErrorCode],
], $kkt->getNetworkError());
}
}