Example #1
0
    public function testExecuteCurrentStoreCurrency()
    {
        $this->httpContextMock->expects($this->at(0))
            ->method('setValue')
            ->with(StoreManagerInterface::CONTEXT_STORE, 'custom_store', 'default');
        /** Make sure that current currency is taken from current store if no value is provided in session */
        $this->httpContextMock->expects($this->at(1))
            ->method('setValue')
            ->with(Context::CONTEXT_CURRENCY, self::CURRENCY_CURRENT_STORE, self::CURRENCY_DEFAULT);

        $this->assertEquals(
            'ExpectedValue',
            $this->plugin->aroundExecute($this->subjectMock, $this->closureMock, $this->requestMock)
        );
    }