Eccube\Tests\Plugin\Web\Admin\Product\CategoryControllerTest::testIndexWithPostParent PHP Method

testIndexWithPostParent() public method

    public function testIndexWithPostParent()
    {
        $Parent = $this->app['eccube.repository.category']->findOneBy(array('name' => '子1'));
        $crawler = $this->client->request('POST', $this->app->url('admin_product_category_show', array('parent_id' => $Parent->getId())), array('admin_category' => array('_token' => 'dummy', 'name' => 'テストカテゴリ')));
        $this->assertTrue($this->client->getResponse()->isRedirect($this->app->url('admin_product_category_show', array('parent_id' => $Parent->getId()))));
        $expected = array(EccubeEvents::ADMIN_PRODUCT_CATEGORY_INDEX_INITIALIZE, EccubeEvents::ADMIN_PRODUCT_CATEGORY_INDEX_COMPLETE);
        $this->verifyOutputString($expected);
    }