[symfony-users] Re: functional tests : issue with auto-increment and userID

2009-10-31 Thread Alexandre SALOME
Isolate your database, delete any other database related to your project,

rebuild all the project,

check that no other database was created.

And finally, look at your log (log/app_env.log).

2009/10/29 Adrien Mogenet 

>
> I run tests under 'test' env which works perfectly, using a app-test
> database :-)
>
> The point I would like to figure out is really the issue with the ID
> that my sfBrowser is returning after signing in, which is different
> from the ID in Database, but not the first time, just after reloading
> fixtures automatically at least once time !
>
> Thanks for helping me,
>
> Adrien
>
> On 29 oct, 11:28, Gareth McCumskey  wrote:
> > This is the expected behaviour because symfony's load fixture methods
> dont
> > drop the tables and recreate them. If you drop the database yourself and
> > regenerate it before you run tests, or truncate each table, then you
> should
> > have things working as you want.
> >
> > On Tue, Oct 27, 2009 at 6:09 PM, Adrien Mogenet <
> adrien.moge...@gmail.com>wrote:
> >
> >
> >
> >
> >
> > > Hi everyone,
> >
> > > I'm using fixture to fill my database with 3 fake user accounts, the
> > > first one is my "demo" account.
> > > I'm writing my tests using a $browser as sfGuardTestFunctional, which
> > > signs me in automatically.
> >
> > > The first time I launch my test, my $browser works perferctly and
> > > shows that my User ID is #1 [OK]
> >
> > > But, second time, fixtures are put within my DB, so my "demo" account
> > > get the ID #4, but my $browser, which signs in again perfectly, says
> > > that I have the user ID #3 !!!
> >
> > > This behaviour avoid any other INSERT operation, resulting in
> > > constraint issues.
> >
> > > Thanks for helping me :-)
> >
> > > --
> > > Adrien
> >
> > --
> > Gareth McCumskeyhttp://garethmccumskey.blogspot.com
> > twitter: @garethmcc
> >
>


-- 
Alexandre Salomé -- alexandre.sal...@gmail.com

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: functional tests : issue with auto-increment and userID

2009-10-29 Thread Adrien Mogenet

I run tests under 'test' env which works perfectly, using a app-test
database :-)

The point I would like to figure out is really the issue with the ID
that my sfBrowser is returning after signing in, which is different
from the ID in Database, but not the first time, just after reloading
fixtures automatically at least once time !

Thanks for helping me,

Adrien

On 29 oct, 11:28, Gareth McCumskey  wrote:
> This is the expected behaviour because symfony's load fixture methods dont
> drop the tables and recreate them. If you drop the database yourself and
> regenerate it before you run tests, or truncate each table, then you should
> have things working as you want.
>
> On Tue, Oct 27, 2009 at 6:09 PM, Adrien Mogenet 
> wrote:
>
>
>
>
>
> > Hi everyone,
>
> > I'm using fixture to fill my database with 3 fake user accounts, the
> > first one is my "demo" account.
> > I'm writing my tests using a $browser as sfGuardTestFunctional, which
> > signs me in automatically.
>
> > The first time I launch my test, my $browser works perferctly and
> > shows that my User ID is #1 [OK]
>
> > But, second time, fixtures are put within my DB, so my "demo" account
> > get the ID #4, but my $browser, which signs in again perfectly, says
> > that I have the user ID #3 !!!
>
> > This behaviour avoid any other INSERT operation, resulting in
> > constraint issues.
>
> > Thanks for helping me :-)
>
> > --
> > Adrien
>
> --
> Gareth McCumskeyhttp://garethmccumskey.blogspot.com
> twitter: @garethmcc
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: functional tests : issue with auto-increment and userID

2009-10-29 Thread Gareth McCumskey
This is the expected behaviour because symfony's load fixture methods dont
drop the tables and recreate them. If you drop the database yourself and
regenerate it before you run tests, or truncate each table, then you should
have things working as you want.

On Tue, Oct 27, 2009 at 6:09 PM, Adrien Mogenet wrote:

>
> Hi everyone,
>
> I'm using fixture to fill my database with 3 fake user accounts, the
> first one is my "demo" account.
> I'm writing my tests using a $browser as sfGuardTestFunctional, which
> signs me in automatically.
>
> The first time I launch my test, my $browser works perferctly and
> shows that my User ID is #1 [OK]
>
> But, second time, fixtures are put within my DB, so my "demo" account
> get the ID #4, but my $browser, which signs in again perfectly, says
> that I have the user ID #3 !!!
>
> This behaviour avoid any other INSERT operation, resulting in
> constraint issues.
>
> Thanks for helping me :-)
>
> --
> Adrien
> >
>


-- 
Gareth McCumskey
http://garethmccumskey.blogspot.com
twitter: @garethmcc

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: functional tests : issue with auto-increment and userID

2009-10-29 Thread Alexandre SALOME
Have you set environments ?

a "dev", "test" "prod" ? Have you different databases ?

In which one are you running your tests ?

And if you drop all DB except the "test", does it works ?



2009/10/27 Adrien Mogenet 

>
> Hi everyone,
>
> I'm using fixture to fill my database with 3 fake user accounts, the
> first one is my "demo" account.
> I'm writing my tests using a $browser as sfGuardTestFunctional, which
> signs me in automatically.
>
> The first time I launch my test, my $browser works perferctly and
> shows that my User ID is #1 [OK]
>
> But, second time, fixtures are put within my DB, so my "demo" account
> get the ID #4, but my $browser, which signs in again perfectly, says
> that I have the user ID #3 !!!
>
> This behaviour avoid any other INSERT operation, resulting in
> constraint issues.
>
> Thanks for helping me :-)
>
> --
> Adrien
> >
>


-- 
Alexandre Salomé -- alexandre.sal...@gmail.com

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---