Example #1
0
 protected function setUp()
 {
     $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
     $this->consumer = $objectManager->create('Magento\\Integration\\Model\\Oauth\\Consumer');
     $this->consumer->setData(['key' => md5(uniqid()), 'secret' => md5(uniqid()), 'callback_url' => 'http://example.com/callback', 'rejected_callback_url' => 'http://example.com/rejectedCallback'])->save();
     $this->integration = $objectManager->create('Magento\\Integration\\Model\\Integration');
     $this->integration->setName('Test Integration')->setConsumerId($this->consumer->getId())->setStatus(\Magento\Integration\Model\Integration::STATUS_ACTIVE)->save();
 }