PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Wed Dec 12, 2018 3:09 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Sun Aug 07, 2005 8:57 pm 
Offline
DevNet Resident
User avatar

Joined: Fri Aug 16, 2002 8:57 am
Posts: 1834
Location: Watertown, MA
I currently have a class hierachy of
WebTestCase (from SimpleTest) <--- DatabaseWebTestCase (adds on sandboxeing) <--- WebAuthTestCase (builds in the required application autnetication).

The DatabaseWebTestCase is my new component. Everything worked with WebAuthTestCase before. Now I'm getting errors on line 704 of web_tester -- apparently WebTestCase's _browser is no longer being initialized.

I am chaining constructors and setUp/tearDown's, I have no member variables masking the underlying ones. Any idess as to what could interfere with _browser in web_tester?

[EDIT:
OK I'm extremely confused now, I've been staring through the WebTestCase code. I can't figure out how it ever worked before. Neither the constructor nor the setUp initialize the _browser member variables. None of the mthods that use it do an lazy initialization. I see that I can explciictly call setBrowser($this->createBrowser()), but I never had to before.... What's missing?]


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 08, 2005 1:11 am 
Offline
DevNet Master

Joined: Thu Jan 30, 2003 9:26 pm
Posts: 2893
Location: Glasgow, Scotland
Not sure what the problem could be. I've hacked together the odd custom assertion but I'm not too familiar with the code.

You could always try stepping through the code with die(__FILE__ . ' | ' . __LINE__) or something similar. Once you're testing you don't have to do that too often ;)


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 08, 2005 4:15 pm 
Offline
DevNet Resident
User avatar

Joined: Fri Aug 16, 2002 8:57 am
Posts: 1834
Location: Watertown, MA
Ugh its getting worse....

SimpleTestCase is now losing its _runner....

I just downloaded a new copy of simpletest and the problem is still here. I've emailed the simpletest list, but I know Marcus is travelling this week....

I just ran the test suites (unit and all) for simpletest and they all passed.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 08, 2005 9:03 pm 
Offline
DevNet Resident
User avatar

Joined: Fri Aug 16, 2002 8:57 am
Posts: 1834
Location: Watertown, MA
Looks like its due to my testing the tests.

Both WebTestCase and UnitTestCase do some of their setup in their invoke method. So just chaining constructors and setUp won't get the underlying testcase into a valud state to test.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group