Eccube\Tests\Web\Admin\Product\CategoryControllerTest::testRoutingAdminProductCategoryShow PHP Метод

testRoutingAdminProductCategoryShow() публичный Метод

    public function testRoutingAdminProductCategoryShow()
    {
        // before
        $TestCreator = $this->createMember();
        $TestParentCategory = $this->newTestCategory($TestCreator);
        $this->app['orm.em']->persist($TestParentCategory);
        $this->app['orm.em']->flush();
        $TestCategory = $this->newTestCategory($TestCreator, $TestParentCategory);
        $this->app['orm.em']->persist($TestCategory);
        $this->app['orm.em']->flush();
        $test_parent_category_id = $this->app['eccube.repository.category']->findOneBy(array('name' => $TestParentCategory->getName()))->getId();
        // main
        $this->client->request('GET', $this->app->url('admin_product_category_show', array('parent_id' => $test_parent_category_id)));
        $this->assertTrue($this->client->getResponse()->isSuccessful());
        // after
        $this->app['orm.em']->remove($TestCategory);
        $this->app['orm.em']->flush();
        $this->app['orm.em']->remove($TestParentCategory);
        $this->app['orm.em']->flush();
    }