source: branches/version-2_13-dev/tests/class/SC_Date/SC_Date_getHourTest.php @ 22857

Revision 22857, 1.9 KB checked in by Seasoft, 11 years ago (diff)

#2043 (typo修正・ソース整形・ソースコメントの改善 for 2.13.0)

  • 主に空白・空白行の調整。
Line 
1<?php
2/*
3 * This file is part of EC-CUBE
4 *
5 * Copyright(c) 2000-2013 LOCKON CO.,LTD. All Rights Reserved.
6 *
7 * http://www.lockon.co.jp/
8 *
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License
11 * as published by the Free Software Foundation; either version 2
12 * of the License, or (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
22 */
23
24$HOME = realpath(dirname(__FILE__)) . "/../../..";
25require_once($HOME . "/tests/class/Common_TestCase.php");
26
27class SC_Date_getHourTest extends Common_TestCase
28{
29
30    protected function setUp()
31    {
32        parent::setUp();
33        $this->objDate = new SC_Date_Ex();
34    }
35
36    protected function tearDown()
37    {
38        parent::tearDown();
39    }
40
41    /////////////////////////////////////////
42
43    public function testGetHour_24の配列を返す()
44    {
45        $this->expected = 24;
46        $this->actual = count($this->objDate->getHour());
47
48        $this->verify("配列の長さ");
49    }
50
51    public function testGetHour_要素の最低値が0の配列を返す()
52    {
53        $this->expected = 0;
54        $this->actual = min($this->objDate->getHour());
55
56        $this->verify("配列の最低値");
57    }
58
59    public function testGetHour_要素の最大値が23の配列を返す()
60    {
61        $this->expected = 23;
62        $this->actual = max($this->objDate->getHour());
63
64        $this->verify("配列の最大値");
65    }
66}
67
Note: See TracBrowser for help on using the repository browser.