Eccube\Tests\Repository\CategoryRepositoryTest::testUp PHP Метод

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

public testUp ( )
    public function testUp()
    {
        // CategoryRepository::upは、現状機能しておらず、期待値を返さないが、deprecatedのためスキップする
        $this->markTestSkipped('CategoryRepository::up() is deprecated.');
        $Category = $this->app['eccube.repository.category']->findOneBy(array('name' => '親2'));
        // CategoryRepository::up() では, rank を1つだけ加算することに注意
        $result = $this->app['eccube.repository.category']->up($Category);
        $this->assertTrue($result);
        $Categories = $this->app['eccube.repository.category']->getList();
        $this->actual = array();
        $c = array();
        foreach ($Categories as $Category) {
            $this->actual[] = $Category->getName();
            $c[$Category->getRank()] = $Category->getName();
        }
        $this->expected = array('親2', '親3', '親1');
        // 現状、array('親2', '親1', '親3')が返っている
        $this->verify('取得したカテゴリ名が正しくありません');
    }