示例#1
0
 public function testBeforeSave()
 {
     $this->flag->setData('block', 'blockNmae');
     $result = $this->flag->save();
     $this->assertSame($this->flag, $result);
     $this->assertEquals('synchronize', $this->flag->getFlagCode());
 }
示例#2
0
 /**
  * @expectedException \Magento\Framework\Model\Exception
  * @expectedExceptionMessage Please define flag code.
  */
 public function testBeforeSaveException()
 {
     $this->createInstance();
     $this->flag->setData('block', 'blockNmae');
     $this->flag->save();
 }