source: branches/camp/camp-2_13-tests/tests/class/helper/SC_Helper_News/SC_Helper_News_moveRankTest.php @ 22722

Revision 22722, 1.0 KB checked in by takeda, 11 years ago (diff)

#2184 news_id開始値の変更

Line 
1<?php
2
3$HOME = realpath(dirname(__FILE__)) . "/../../../..";
4require_once($HOME . "/tests/class/helper/SC_Helper_News/SC_Helper_News_TestBase.php");
5/**
6 *
7 */
8class SC_Helper_News_moveRankTest extends SC_Helper_News_TestBase
9{
10
11    protected function setUp()
12    {
13        parent::setUp();
14        $this->objNews = new SC_Helper_News_Ex();
15    }
16
17    protected function tearDown()
18    {
19        parent::tearDown();
20    }
21
22    /////////////////////////////////////////
23
24    public function testMoveRankTest_ニュースIDと移動先ランクを指定した場合_対象のランクが移動する()
25    {
26        $objQuery =& SC_Query_Ex::getSingletonInstance();
27        $this->setUpNews();
28        $news_id = 1001;
29        $rank = 1;
30
31        $this->expected = '4';
32
33        $this->objNews->moveRank($news_id, $rank);
34
35        $col = 'rank';
36        $from = 'dtb_news';
37        $where = 'news_id = ?';
38        $whereVal = array($news_id);
39        $res = $objQuery->get($col, $from, $where, $whereVal);
40        $this->actual = $res;
41
42        $this->verify();
43    }
44}
45
Note: See TracBrowser for help on using the repository browser.