Author: as
Date: Tue Aug  7 16:52:26 2007
New Revision: 5839

Log:
- The timestamp is now an integer in the associations table.
- Fixed one broken test because of the timestamp.

Modified:
    trunk/AuthenticationDatabaseTiein/docs/tutorial/openid_db_store_schema.dba
    trunk/AuthenticationDatabaseTiein/src/filters/openid/openid_db_store.php
    
trunk/AuthenticationDatabaseTiein/tests/filters/openid/openid_db_store_test.php

Modified: 
trunk/AuthenticationDatabaseTiein/docs/tutorial/openid_db_store_schema.dba
==============================================================================
--- trunk/AuthenticationDatabaseTiein/docs/tutorial/openid_db_store_schema.dba 
[iso-8859-1] (original)
+++ trunk/AuthenticationDatabaseTiein/docs/tutorial/openid_db_store_schema.dba 
[iso-8859-1] Tue Aug  7 16:52:26 2007
@@ -55,8 +55,8 @@
         )),
         'timestamp' => 
         ezcDbSchemaField::__set_state(array(
-           'type' => 'text',
-           'length' => 32,
+           'type' => 'integer',
+           'length' => 0,
            'notNull' => false,
            'default' => NULL,
            'autoIncrement' => false,
@@ -83,4 +83,4 @@
   1 => 
   array (
   ),
-); ?>
+); ?>

Modified: 
trunk/AuthenticationDatabaseTiein/src/filters/openid/openid_db_store.php
==============================================================================
--- trunk/AuthenticationDatabaseTiein/src/filters/openid/openid_db_store.php 
[iso-8859-1] (original)
+++ trunk/AuthenticationDatabaseTiein/src/filters/openid/openid_db_store.php 
[iso-8859-1] Tue Aug  7 16:52:26 2007
@@ -175,7 +175,7 @@
         if ( count( $rows ) > 0 )
         {
             $rows = $rows[0];
-            $lastModified = $rows[$table['fields']['timestamp']];
+            $lastModified = (int) $rows[$table['fields']['timestamp']];
 
             $this->removeNonce( $nonce );
 

Modified: 
trunk/AuthenticationDatabaseTiein/tests/filters/openid/openid_db_store_test.php
==============================================================================
--- 
trunk/AuthenticationDatabaseTiein/tests/filters/openid/openid_db_store_test.php 
[iso-8859-1] (original)
+++ 
trunk/AuthenticationDatabaseTiein/tests/filters/openid/openid_db_store_test.php 
[iso-8859-1] Tue Aug  7 16:52:26 2007
@@ -97,7 +97,7 @@
 
         catch ( Exception $e )
         {
-            $this->markTestSkipped( "You must provide a database to 
runtests.php." );
+            $this->markTestSkipped( "You must provide a database to 
runtests.php: " . $e->getMessage() );
         }
 
     }
@@ -146,7 +146,7 @@
         $this->assertEquals( true, in_array( $nonce, 
ezcAuthenticationOpenidDbStoreHelper::getNonces( $this->db ) ) );
 
         $ret = $store->useNonce( $nonce );
-        $this->assertEquals( true, $ret );
+        $this->assertSame( time(), $ret );
         $this->assertEquals( false, in_array( $nonce, 
ezcAuthenticationOpenidDbStoreHelper::getNonces( $this->db ) ) );
     }
 


-- 
svn-components mailing list
[email protected]
http://lists.ez.no/mailman/listinfo/svn-components

Reply via email to