Skip to content

Commit 2f75107

Browse files
author
Anton Evers
committed
Add tests
1 parent 5cfe3ef commit 2f75107

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/internal/Magento/Framework/ObjectManager/Test/Unit/Code/Generator/_files/SampleRepository.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,12 @@ class SampleRepository implements SampleRepositoryInterface
6767
public function get($id)
6868
{
6969
if (!$id) {
70-
throw new \Magento\Framework\Exception\InputException('ID required');
70+
throw new \Magento\Framework\Exception\InputException(__('ID required'));
7171
}
7272
if (!isset($this->registry[$id])) {
7373
$entity = $this->sampleInterfacePersistor->loadEntity($id);
7474
if (!$entity->getId()) {
75-
throw new \Magento\Framework\Exception\NoSuchEntityException('Requested entity doesn\'t exist');
75+
throw new \Magento\Framework\Exception\NoSuchEntityException(__('Requested entity doesn\'t exist'));
7676
}
7777
$this->registry[$id] = $entity;
7878
}

lib/internal/Magento/Framework/ObjectManager/Test/Unit/Code/Generator/_files/TSampleRepository.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,12 @@ class TSampleRepository implements TSampleRepositoryInterface
6767
public function get(int $id) : \Magento\Framework\ObjectManager\Code\Generator\TSampleInterface
6868
{
6969
if (!$id) {
70-
throw new \Magento\Framework\Exception\InputException('ID required');
70+
throw new \Magento\Framework\Exception\InputException(__('ID required'));
7171
}
7272
if (!isset($this->registry[$id])) {
7373
$entity = $this->tSampleInterfacePersistor->loadEntity($id);
7474
if (!$entity->getId()) {
75-
throw new \Magento\Framework\Exception\NoSuchEntityException('Requested entity doesn\'t exist');
75+
throw new \Magento\Framework\Exception\NoSuchEntityException(__('Requested entity doesn\'t exist'));
7676
}
7777
$this->registry[$id] = $entity;
7878
}

0 commit comments

Comments
 (0)