示例#1
0
 /**
  * Test crud operations for theme model using valid data
  *
  * @magentoDbIsolation enabled
  */
 public function testCrud()
 {
     /** @var $themeModel \Magento\Framework\View\Design\ThemeInterface */
     $themeModel = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\\Framework\\View\\Design\\ThemeInterface');
     $themeModel->setData($this->_getThemeValidData());
     $crud = new \Magento\TestFramework\Entity($themeModel, array('theme_version' => '0.1.0'));
     $crud->testCrud();
 }
示例#2
0
 /**
  * Test crud operations for change model using valid data
  *
  * @magentoDbIsolation enabled
  */
 public function testCrud()
 {
     /** @var $changeModel \Magento\DesignEditor\Model\Theme\Change */
     $changeModel = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\\DesignEditor\\Model\\Theme\\Change');
     $changeModel->setData($this->_getChangeValidData());
     $crud = new \Magento\TestFramework\Entity($changeModel, ['change_time' => '2012-06-10 20:00:01']);
     $crud->testCrud();
 }
示例#3
0
 /**
  * @magentoDbIsolation enabled
  * @magentoAppIsolation enabled
  * @magentoAppArea adminhtml
  */
 public function testCRUD()
 {
     $this->_model->setTypeId(\Magento\Catalog\Model\Product\Type::TYPE_BUNDLE)->setAttributeSetId(4)->setName('Bundle Product')->setSku(uniqid())->setPrice(10)->setMetaTitle('meta title')->setMetaKeyword('meta keyword')->setMetaDescription('meta description')->setVisibility(\Magento\Catalog\Model\Product\Visibility::VISIBILITY_BOTH)->setStatus(\Magento\Catalog\Model\Product\Attribute\Source\Status::STATUS_ENABLED);
     $crud = new \Magento\TestFramework\Entity($this->_model, array('sku' => uniqid()));
     $crud->testCrud();
 }
示例#4
0
 /**
  * @magentoAppIsolation enabled
  * @magentoAppArea adminhtml
  */
 public function testCRUD()
 {
     $this->_model->setData(array('code' => 'test_website', 'name' => 'test website', 'default_group_id' => 1));
     /* emulate admin store */
     $crud = new \Magento\TestFramework\Entity($this->_model, array('name' => 'new name'));
     $crud->testCrud();
 }
示例#5
0
 public function testCRUD()
 {
     $this->_model->setAttributeCode('test')->setEntityTypeId(\Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\\Eav\\Model\\Config')->getEntityType('catalog_product')->getId())->setFrontendLabel('test');
     $crud = new \Magento\TestFramework\Entity($this->_model, array('frontend_label' => uniqid()));
     $crud->testCrud();
 }
示例#6
0
 /**
  * @magentoDbIsolation enabled
  */
 public function testCRUD()
 {
     $this->_model->setFirstname("John")->setLastname("Doe")->setUsername('user2')->setPassword(\Magento\TestFramework\Bootstrap::ADMIN_PASSWORD)->setEmail('*****@*****.**');
     $crud = new \Magento\TestFramework\Entity($this->_model, ['firstname' => '_New_name_']);
     $crud->testCrud();
 }
示例#7
0
 public function testCRUD()
 {
     $this->groupModel->setCode('test');
     $crud = new \Magento\TestFramework\Entity($this->groupModel, ['customer_group_code' => uniqid()]);
     $crud->testCrud();
 }
示例#8
0
 /**
  * @magentoAppIsolation enabled
  * @magentoAppArea adminhtml
  * @magentoDbIsolation enabled
  */
 public function testCRUD()
 {
     $this->model->setData(['code' => 'test', 'website_id' => 1, 'group_id' => 1, 'name' => 'test name', 'sort_order' => 0, 'is_active' => 1]);
     $crud = new \Magento\TestFramework\Entity($this->model, ['name' => 'new name'], 'Magento\\Store\\Model\\Store');
     $crud->testCrud();
 }
示例#9
0
 public function testCRUD()
 {
     $this->_model->setData(array('scope' => 'default', 'scope_id' => 0, 'path' => 'test/config/path', 'value' => 'test value'));
     $crud = new \Magento\TestFramework\Entity($this->_model, array('value' => 'new value'));
     $crud->testCrud();
 }
示例#10
0
 /**
  * Test crud operations for theme files model using valid data
  */
 public function testCrud()
 {
     $this->_model->setData($this->_data);
     $crud = new \Magento\TestFramework\Entity($this->_model, array('file_path' => 'rename.css'));
     $crud->testCrud();
 }
示例#11
0
 /**
  * @magentoDbIsolation enabled
  */
 public function testCrud()
 {
     $this->_model->setData(['handle' => 'default', 'xml' => '<layout/>', 'sort_order' => 123]);
     $entityHelper = new \Magento\TestFramework\Entity($this->_model, ['handle' => 'custom', 'xml' => '<layout version="0.1.0"/>', 'sort_order' => 456]);
     $entityHelper->testCrud();
 }
示例#12
0
 /**
  * @magentoDbIsolation enabled
  */
 public function testCRUD()
 {
     $this->_model->setRoleType('G')->setResourceId('Magento_Adminhtml::all')->setPrivileges("")->setAssertId(0)->setRoleId(1)->setPermission('allow');
     $crud = new \Magento\TestFramework\Entity($this->_model, array('permission' => 'deny'));
     $crud->testCrud();
 }
示例#13
0
 /**
  * @magentoDbIsolation enabled
  *
  * @throws \Exception
  */
 public function testCRUD()
 {
     $this->model->setStoreId($this->objectManager->get('Magento\\Store\\Model\\StoreManagerInterface')->getDefaultStoreView()->getId())->setRequestPath('fancy/url.html')->setTargetPath('catalog/product/view')->setIsSystem(1)->setOptions('RP');
     $crud = new \Magento\TestFramework\Entity($this->model, ['request_path' => 'fancy/url2.html']);
     $crud->testCrud();
 }