--- /dev/null
+<?php
+/**
+ * Test the Horde_Auth:: class.
+ *
+ * PHP version 5
+ *
+ * @category Horde
+ * @package Auth
+ * @subpackage UnitTests
+ * @author Gunnar Wrobel <wrobel@pardus.de>
+ * @license http://www.fsf.org/copyleft/lgpl.html LGPL
+ * @link http://pear.horde.org/index.php?package=Auth
+ */
+
+/**
+ * Prepare the test setup.
+ */
+require_once dirname(__FILE__) . '/../Autoload.php';
+
+/**
+ * Test the Horde_Auth:: class.
+ *
+ * Copyright 2010 The Horde Project (http://www.horde.org/)
+ *
+ * See the enclosed file COPYING for license information (LGPL). If you
+ * did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
+ *
+ * @category Horde
+ * @package Auth
+ * @subpackage UnitTests
+ * @author Gunnar Wrobel <wrobel@pardus.de>
+ * @license http://www.fsf.org/copyleft/lgpl.html LGPL
+ * @link http://pear.horde.org/index.php?package=Auth
+ */
+class Horde_Auth_Unit_PasswdTest extends Horde_Auth_TestCase
+{
+ public function setUp()
+ {
+ $this->driver = new Horde_Auth_Passwd(
+ array('filename' => dirname(__FILE__) . '/../fixtures/test.passwd')
+ );
+ }
+
+ public function testAuthenticate()
+ {
+ $this->assertTrue($this->driver->authenticate('user', array('password' => 'password')));
+ }
+
+ public function testListUsers()
+ {
+ $this->assertEquals(array('user'), $this->driver->listUsers());
+ }
+}
\ No newline at end of file
+++ /dev/null
---TEST--
-Horde_Auth_Passwd:: test
---FILE--
-<?php
-
-require_once dirname(__FILE__) . '/../../../lib/Horde/Auth.php';
-require_once dirname(__FILE__) . '/../../../lib/Horde/Auth/Base.php';
-require_once dirname(__FILE__) . '/../../../lib/Horde/Auth/Passwd.php';
-
-$auth = Horde_Auth::factory('passwd', array('filename' => dirname(__FILE__) . '/test.passwd'));
-
-// List users
-var_dump($auth->listUsers());
-
-// Authenticate
-var_dump($auth->authenticate('user', array('password' => 'password')));
-
-?>
---EXPECT--
-array(1) {
- [0]=>
- string(4) "user"
-}
-bool(true)