logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

cvs: pearweb /tests/site/pear-auth.php/auth_verify test_oldpasswd.phpt: msg#00234

Subject: cvs: pearweb /tests/site/pear-auth.php/auth_verify test_oldpasswd.phpt
cellog          Mon May 28 22:17:26 2007 UTC

  Added files:                 
    /pearweb/tests/site/pear-auth.php/auth_verify       test_oldpasswd.phpt 
  Log:
  new test
  

http://cvs.php.net/viewvc.cgi/pearweb/tests/site/pear-auth.php/auth_verify/test_oldpasswd.phpt?view=markup&rev=1.1
Index: pearweb/tests/site/pear-auth.php/auth_verify/test_oldpasswd.phpt
+++ pearweb/tests/site/pear-auth.php/auth_verify/test_oldpasswd.phpt
--TEST--
auth_verify() [old-style password]
--FILE--
<?php
// setup
$_ENV['PEAR_TMPDIR'] = dirname(__FILE__) . '/testmebaby';
require dirname(dirname(__FILE__)) . '/setup.php.inc';
$mock->addDataQuery("SELECT * FROM users WHERE handle = 'cellog' AND registered 
= '1'", array (
  0 => 
  array (
    'handle' => 'cellog',
    'password' => crypt('as if!', 'as'),
    'name' => 'Greg Beaver',
    'email' => 'greg@xxxxxxxxxxxxxxxxx',
    'homepage' => 'http://greg.chiaraquartet.net',
    'created' => '2002-11-22 16:16:00',
    'createdby' => 'richard',
    'lastlogin' => NULL,
    'showemail' => '0',
    'registered' => '1',
    'admin' => '0',
    'userinfo' => '',
    'pgpkeyid' => '1F81E560',
    'pgpkey' => NULL,
    'wishlist' => 'http://www.chiaraquartet.net',
    'longitude' => '-96.6831931472',
    'latitude' => '40.7818087725',
    'active' => '1',
  ),
), array('handle', 'password', 'name', 'email', 'homepage', 'created',
    'createdby', 'lastlogin', 'showemail', 'registered', 'admin', 'userinfo',
    'pgpkeyid', 'pgpkey', 'wishlist', 'longitude', 'latitude', 'active'));

$mock->addDataQuery("SELECT * FROM karma WHERE user = 'cellog' AND level IN 
('pear.user','pear.pepr','pear.dev','pear.admin','pear.group','pear.voter','pear.bug')",
 array(
    array(
        'id' => 1, 'user' => 'cellog', 'level' => 'pear.admin', 'granted_by' => 
'cellog',
        'granted_at' => '2007-05-28 17:16:00'
    )
), array('id', 'user', 'level', 'granted_by', 'granted_at'));
$phpunit->assertFalse(array_key_exists('auth_user', $GLOBALS), 'setup');
$phpunit->assertTrue(auth_verify('cellog', 'as if!'), 'test');
$phpunit->assertTrue(array_key_exists('auth_user', $GLOBALS), 'auth_user set');
?>
===DONE===
--EXPECT--
===DONE===

-- 
PEAR CVS Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




<Prev in Thread] Current Thread [Next in Thread>