source: branches/version-2_12-dev/tests/class/replace/SC_Display_Ex.php @ 22796

Revision 22796, 860 bytes checked in by h_yoshimoto, 11 years ago (diff)

#2236 2.12.3リリース以降の2.12-devへのコミット差し戻し

Line 
1<?php
2require_once(realpath(dirname(__FILE__)) . "/../../../data/class/SC_Display.php");
3/**
4 * テスト用にSC_Displayクラスを変更してユーザエージェントを自在に設定できるようにしたクラスです。
5 */
6class SC_Display_Ex extends SC_Display {
7
8  /** テスト用に設定した端末種別 */
9  static $dummyDevice = DEVICE_TYPE_PC;
10
11  /**
12   * 予めテスト用に設定された端末種別を取得します。
13   * @static
14   * @param     $reset  boolean
15   * @return    integer 端末種別ID
16   */
17  public static function detectDevice($reset = FALSE) {
18    return self::$dummyDevice;
19  }
20
21  /**
22   * テスト用に端末種別を設定します。
23   *
24   * @static
25   * @param     $deviceType 端末種別ID
26   */
27  public static function setDummyDevice($deviceType) {
28    self::$dummyDevice = $deviceType;
29  }
30}
31
32
Note: See TracBrowser for help on using the repository browser.