public function testGetOne()
 {
     $this->setLoadAllExpectation();
     $this->setLoadConfigExpectation();
     $this->assertSame(['key' => 'value'], $this->model->getOne('foo'));
     $this->assertNull($this->model->getOne('bar'));
 }
 public function testGetOne()
 {
     $this->config->expects($this->exactly(2))->method('resetData');
     $this->setLoadAllExpectation();
     $this->setLoadConfigExpectation();
     $this->assertSame(['key' => 'value'], $this->model->getOne('foo'));
     $this->assertNull($this->model->getOne('bar'));
 }
Exemple #3
0
 public function testGetOne()
 {
     $this->config->expects($this->once())->method('isAvailable')->willReturn(true);
     $this->setLoadAllExpectation();
     $this->setLoadConfigExpectation();
     $this->assertSame(['key' => 'value'], $this->model->getOne('foo'));
     $this->assertNull($this->model->getOne('bar'));
 }
Exemple #4
0
 /**
  * Load library vendor
  */
 private function loader()
 {
     /** @var \Magento\Framework\App\ObjectManager $objectManager */
     $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
     $productMetadata = $objectManager->get('Magento\\Framework\\App\\ProductMetadataInterface');
     $timezone = $objectManager->create('\\Magento\\Framework\\Stdlib\\DateTime\\TimezoneInterface');
     /** @var \Magento\Framework\App\ProductMetadataInterface $productMetadata */
     //set the store timezone to the script
     date_default_timezone_set($timezone->getConfigTimezone());
     \PagSeguro\Library::initialize();
     \PagSeguro\Library::cmsVersion()->setName("Magento")->setRelease($productMetadata->getVersion());
     \PagSeguro\Library::moduleVersion()->setName($this->_moduleList->getOne('UOL_PagSeguro')['name'])->setRelease($this->_moduleList->getOne('UOL_PagSeguro')['setup_version']);
 }