| @@ 74-90 (lines=17) @@ | ||
| 71 | /** |
|
| 72 | * {@inheritdoc} |
|
| 73 | */ |
|
| 74 | protected function setUp() |
|
| 75 | { |
|
| 76 | $this->request = $this->createMock(Request::class); |
|
| 77 | $this->router = $this->createMock(RouterInterface::class); |
|
| 78 | $this->packages = $this->getMockBuilder(Packages::class) |
|
| 79 | ->disableOriginalConstructor() |
|
| 80 | ->getMock(); |
|
| 81 | ||
| 82 | $this->requestStack = $this->createMock(RequestStack::class); |
|
| 83 | $this->requestStack->expects($this->any())->method('getCurrentRequest')->will($this->returnValue($this->request)); |
|
| 84 | $this->templating = $this->createMock(EngineInterface::class); |
|
| 85 | $this->twig = $this->getMockBuilder(\Twig_Environment::class) |
|
| 86 | ->disableOriginalConstructor() |
|
| 87 | ->getMock(); |
|
| 88 | ||
| 89 | $this->renderer = new CKEditorRenderer(new JsonBuilder(), $this->router, $this->packages, $this->requestStack, $this->templating); |
|
| 90 | } |
|
| 91 | ||
| 92 | public function testDefaultState() |
|
| 93 | { |
|
| @@ 70-84 (lines=15) @@ | ||
| 67 | /** |
|
| 68 | * {@inheritdoc} |
|
| 69 | */ |
|
| 70 | protected function setUp() |
|
| 71 | { |
|
| 72 | $this->requestStack = $this->createMock(RequestStack::class); |
|
| 73 | $this->request = $this->createMock(Request::class); |
|
| 74 | $this->requestStack->expects($this->any())->method('getCurrentRequest')->will($this->returnValue($this->request)); |
|
| 75 | $this->router = $this->createMock(RouterInterface::class); |
|
| 76 | $this->packages = $this->createMock(Packages::class); |
|
| 77 | $this->packages |
|
| 78 | ->expects($this->any()) |
|
| 79 | ->method('getUrl') |
|
| 80 | ->will($this->returnArgument(0)); |
|
| 81 | $this->templating = $this->createMock(EngineInterface::class); |
|
| 82 | ||
| 83 | $this->renderer = new CKEditorRenderer(new JsonBuilder(), $this->router, $this->packages, $this->requestStack, $this->templating); |
|
| 84 | } |
|
| 85 | ||
| 86 | public function testDefaultState() |
|
| 87 | { |
|