Eccube\Tests\Repository\CategoryRepositoryTest::testDown PHP Method

testDown() public method

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