1 | <?php |
||
2 | |||
3 | /** |
||
4 | * Copyright © 2016-present Spryker Systems GmbH. All rights reserved. |
||
5 | * Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file. |
||
6 | */ |
||
7 | |||
8 | namespace SprykerTest\Zed\ZedNavigation\Business\Model\Cache; |
||
9 | |||
10 | use Spryker\Zed\ZedNavigation\Business\Model\Cache\ZedNavigationCacheBuilder; |
||
11 | use SprykerTest\Zed\ZedNavigation\Business\ZedNavigationBusinessTester; |
||
12 | |||
13 | /** |
||
14 | * Auto-generated group annotations |
||
15 | * |
||
16 | * @group SprykerTest |
||
17 | * @group Zed |
||
18 | * @group ZedNavigation |
||
19 | * @group Business |
||
20 | * @group Model |
||
21 | * @group Cache |
||
22 | * @group ZedNavigationCacheBuilderTest |
||
23 | * Add your own group annotations below this line |
||
24 | */ |
||
25 | class ZedNavigationCacheBuilderTest extends ZedNavigationBusinessTester |
||
26 | { |
||
27 | /** |
||
28 | * @return void |
||
29 | */ |
||
30 | public function testWriteNavigationCacheMustReadNavigationFromCollectorAndPassItToTheCache(): void |
||
31 | { |
||
32 | //prepare |
||
33 | $navigationCacheMock = $this->getZedNavigationCacheMock(); |
||
34 | $navigationCollectorMock = $this->getZedNavigationCollectorMock(); |
||
35 | $navigationCacheBuilder = new ZedNavigationCacheBuilder( |
||
36 | $navigationCollectorMock, |
||
37 | $navigationCacheMock, |
||
38 | $this->getZedNavigationConfigMock(), |
||
39 | ); |
||
40 | $expectedNavigation = [['key' => 'value']]; |
||
41 | |||
42 | //assert |
||
43 | $navigationCacheMock->expects($this->atLeastOnce()) |
||
0 ignored issues
–
show
|
|||
44 | ->method('setNavigation') |
||
45 | ->with($this->equalTo($expectedNavigation)); |
||
46 | $navigationCollectorMock->expects($this->atLeastOnce()) |
||
47 | ->method('getNavigation') |
||
48 | ->will($this->returnValue($expectedNavigation)); |
||
49 | |||
50 | //act |
||
51 | $navigationCacheBuilder->writeNavigationCache(); |
||
52 | } |
||
53 | } |
||
54 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.