Eccube\Tests\Web\Admin\Product\ClassCategoryControllerTest::testRoutingAdminProductClassCategoryEdit PHP Метод

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

    public function testRoutingAdminProductClassCategoryEdit()
    {
        // before
        $TestCreator = $this->createMember();
        $TestClassName = $this->newTestClassName($TestCreator);
        $this->app['orm.em']->persist($TestClassName);
        $this->app['orm.em']->flush();
        $test_class_name_id = $this->app['eccube.repository.class_name']->findOneBy(array('name' => $TestClassName->getName()))->getId();
        $TestClassCategory = $this->newTestClassCategory($TestCreator, $TestClassName);
        $this->app['orm.em']->persist($TestClassCategory);
        $this->app['orm.em']->flush();
        $test_class_category_id = $this->app['eccube.repository.class_category']->findOneBy(array('name' => $TestClassCategory->getName()))->getId();
        // main
        $this->client->request('GET', $this->app->url('admin_product_class_category_edit', array('class_name_id' => $test_class_name_id, 'id' => $test_class_category_id)));
        $this->assertTrue($this->client->getResponse()->isSuccessful());
        // after
        $this->app['orm.em']->remove($TestClassCategory);
        $this->app['orm.em']->flush();
        $this->app['orm.em']->remove($TestClassName);
        $this->app['orm.em']->flush();
    }