| Conditions | 1 |
| Paths | 1 |
| Total Lines | 18 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 17 | public function setUp() |
||
| 18 | { |
||
| 19 | $translation = new Translation(); |
||
| 20 | $translation |
||
| 21 | ->setDomain(self::TEST_DATA_DOMAIN) |
||
| 22 | ->setLocale(self::TEST_DATA_LOCALE) |
||
| 23 | ->setKeyword(self::TEST_DATA_KEYWORD) |
||
| 24 | ->setText(self::TEST_DATA_TEXT) |
||
| 25 | ; |
||
| 26 | |||
| 27 | $translationRepository = $this->createMock(TranslationRepository::class); |
||
| 28 | $translationRepository->method('findBy')->willReturn([$translation]); |
||
| 29 | |||
| 30 | /* @var Loader loader */ |
||
| 31 | $this->loader = new Loader(); |
||
|
|
|||
| 32 | $this->loader->setTranslationRepository($translationRepository); |
||
| 33 | } |
||
| 34 | |||
| 35 | public function testLoad() |
||
| 43 |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: