Location: PHPKode > projects > Maintainable PHP Framework > test/Mad/Model/StreamTest.php
<?php
/**
 * @category   Mad
 * @package    Mad_Model
 * @subpackage UnitTests
 * @copyright  (c) 2007-2009 Maintainable Software, LLC
 * @license    http://opensource.org/licenses/bsd-license.php BSD 
 */

/**
 * Set environment
 */
if (!defined('MAD_ENV')) define('MAD_ENV', 'test');
if (!defined('MAD_ROOT')) {
    require_once dirname(dirname(dirname(dirname(__FILE__)))).'/config/environment.php';
}

/**
 * @group      model
 * @category   Mad
 * @package    Mad_Model
 * @subpackage UnitTests
 * @copyright  (c) 2007-2009 Maintainable Software, LLC
 * @license    http://opensource.org/licenses/bsd-license.php BSD
 */
class Mad_Model_StreamTest extends Mad_Test_Unit
{
    // if we have a find:: method, the stream works!
    public function testFind()
    {
        $this->fixtures('users');

        $user = User::find('first');
        $this->assertEquals('1', $user->id);
    }
}
Return current item: Maintainable PHP Framework