Example #1
0
 public function test_routing_AdminContentBlock_blockDelete()
 {
     $redirectUrl = $this->app->url('admin_content_block');
     $DeviceType = $this->app['eccube.repository.master.device_type']->find(DeviceType::DEVICE_TYPE_PC);
     $Block = new Block();
     $Block->setDeviceType($DeviceType);
     $Block->setFileName('dummy');
     $Block->setLogicFlg($Block::UNUSED_BLOCK_ID);
     $Block->setDeletableFlg(2);
     $this->app['orm.em']->persist($Block);
     $this->app['orm.em']->flush();
     $this->client->request('DELETE', $this->app->url('admin_content_block_delete', array('id' => $Block->getId())));
     $actual = $this->client->getResponse()->isRedirect($redirectUrl);
     $this->assertSame(true, $actual);
     $hookpoints = array(EccubeEvents::ADMIN_CONTENT_BLOCK_DELETE_COMPLETE);
     $this->verifyOutputString($hookpoints);
 }