* @copyright 2008 KUBO Atsuhiro * @license http://www.php.net/license/3_0.txt PHP License 3.0 * @version CVS: $Id: NonMobileTestCase.php,v 1.1 2008/02/06 03:24:33 kuboa Exp $ * @since File available since Release 0.31.0 */ require_once 'PHPUnit/Framework/TestCase.php'; require_once 'Net/UserAgent/Mobile/NonMobile.php'; // {{{ Net_UserAgent_Mobile_NonMobileTestCase /** * Some tests for Net_UserAgent_Mobile_NonMobile. * * @category Networking * @package Net_UserAgent_Mobile * @author KUBO Atsuhiro * @copyright 2008 KUBO Atsuhiro * @license http://www.php.net/license/3_0.txt PHP License 3.0 * @version Release: 1.0.0RC1 * @since Class available since Release 0.31.0 */ class Net_UserAgent_Mobile_NonMobileTestCase extends PHPUnit_Framework_TestCase { // {{{ properties /**#@+ * @access public */ /**#@-*/ /**#@+ * @access protected */ /**#@-*/ /**#@+ * @access private */ private $_profiles = array('Mozilla/5.0 (Windows; U; Windows NT 5.1; ja; rv:1.8.1.4) Gecko/20070515 Firefox/2.0.0.4 GoogleToolbarFF 3.0.20070525' => array(), 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)' => array() ); /**#@-*/ /**#@+ * @access public */ public function testShouldDetectUserAgentsAsNonmobile() { reset($this->_profiles); while (list($userAgent, $profile) = each($this->_profiles)) { $agent = new Net_UserAgent_Mobile_NonMobile($userAgent); $this->assertFalse($agent->isDoCoMo()); $this->assertFalse($agent->isEZweb()); $this->assertFalse($agent->isSoftBank()); $this->assertFalse($agent->isWillcom()); $this->assertTrue($agent->isNonMobile()); } } /**#@-*/ /**#@+ * @access protected */ /**#@-*/ /**#@+ * @access private */ /**#@-*/ // }}} } // }}} /* * Local Variables: * mode: php * coding: iso-8859-1 * tab-width: 4 * c-basic-offset: 4 * c-hanging-comment-ender-p: nil * indent-tabs-mode: nil * End: */