public function testGet() { //Data $formKey = 'test_from_key'; //Verification $this->cookieManagerMock->expects($this->once())->method('getCookie')->with(\Magento\Framework\App\PageCache\FormKey::COOKIE_NAME)->will($this->returnValue($formKey)); $this->assertEquals($formKey, $this->formKey->get()); }