Brilliant, thank you! As usual! - Robert
-----Original Message----- From: Matthew Weier O'Phinney [mailto:[EMAIL PROTECTED] Sent: 03 September 2008 13:37 To: fw-general@lists.zend.com Subject: Re: [fw-general] Question about Quickstart tutorial -- Robert Castley <[EMAIL PROTECTED]> wrote (on Wednesday, 03 September 2008, 11:32 AM +0100): > In the tutorial it sets: > > $bootstrap = true; > > in index.php > > then in bootstrap.php it does a: > > if (isset($bootstrap) && $bootstrap) { ...etc. > > Why is this done? To me it seems unnecessary or am I missing the plot? The flag is for testing. Zend_Test_PHPUnit can make use of the bootstrap.php file to setup the application environment used in testing. However, there is often code that you want to execute on your web server that you don't want to execute in your tests, but which is still application specific -- setting up autoloading, setting up your config objects (you should typically use different config sections in testing than in development or production), etc. Having the $bootstrap flag helps to ensure that you can keep all application setup for the web application in one place, while allowing a slightly different setup for tests. -- Matthew Weier O'Phinney Software Architect | [EMAIL PROTECTED] Zend Framework | http://framework.zend.com/ ________________________________________________________________________ This email has been scanned for all known viruses by the MessageLabs Email Security Service and the Macro 4 plc internal virus protection system. ________________________________________________________________________ ________________________________________________________________________ This email has been scanned for all known viruses by the MessageLabs Email Security Service and the Macro 4 plc internal virus protection system. ________________________________________________________________________