protected function setUp() { $this->objectManagerHelper = new ObjectManagerHelper($this); $this->scheduledStructureMock = $this->getMockBuilder('Magento\\Framework\\View\\Layout\\ScheduledStructure')->disableOriginalConstructor()->getMock(); $this->contextMock = $this->getMockBuilder('Magento\\Framework\\View\\Layout\\Reader\\Context')->disableOriginalConstructor()->getMock(); $this->contextMock->expects($this->any())->method('getScheduledStructure')->willReturn($this->scheduledStructureMock); $this->move = $this->objectManagerHelper->getObject('Magento\\Framework\\View\\Layout\\Reader\\Move'); }
/** * @test * @group inter-end * @group inter **/ public function 処理の終了() { $this->context->expects($this->any())->method('getCurrentCommand')->will($this->returnValue('end')); $result = $this->command->execute($this->context); $this->assertTrue($result); }
/** * @test * @expectedException Exception * @expectedExceptionMessage コマンドが正しくありません * @group inter-invalid-command * @group inter */ public function コマンドが正しくない場合() { $this->context->expects($this->any())->method('getCurrentCommand')->will($this->returnValue('foo')); $this->command->execute($this->context); }