Changeset 1703 -- 2010-03-16 01:08:53
- Author
okonomi
- Comment
- テスト作成
Diffs
Net_UserAgent_Mobile_Capability/trunk/test/Net_UserAgent_Mobile_CapabilityTest.php
@@ -0,0 +1,19 @@
+<?php
+
+require_once 'PHPUnit/Framework.php';
+require_once 'Net/UserAgent/Mobile/Capability.php';
+
+require_once 'Net/UserAgent/Mobile.php';
+
+
+class Net_UserAgent_Mobile_CapabilityTest extends PHPUnit_Framework_TestCase
+{
+ public function testGetBrowserHtmlTable()
+ {
+ $_SERVER['HTTP_USER_AGENT'] = 'DoCoMo/2.0 P906i(c100;TB;W24H15)';
+ $ua = Net_UserAgent_Mobile::factory();
+ $cap = new Net_UserAgent_Mobile_Capability($ua);
+
+ $this->assertEquals($cap->get('browser.html.table'), true);
+ }
+}
Net_UserAgent_Mobile_Capability/trunk/test/bootstrap.php
@@ -0,0 +1,17 @@
+<?php
+
+
+mb_language('ja');
+mb_internal_encoding('UTF-8');
+
+if (defined('E_DEPRECATED')) {
+ error_reporting(E_ALL & ~E_DEPRECATED);
+} else {
+ error_reporting(E_ALL);
+}
+
+set_include_path(realpath(dirname(__FILE__) . '/../src') . PATH_SEPARATOR .
+ get_include_path());
+
+
+define ('HTTP_DOWNLOAD_MOBILE_EZGET_DATA_DIR', dirname(__FILE__).'/data');