I'm working on writing some tests for the core shell class, hopefully
they can be used as a basis on how to write shell unit tests. But
generally you can test them as you normally would test a class.
Obviously you can't dispatch commands in a shell like manner. However
you can build and simulate the commands being called if you are
ingenious enough.
-Mark
On Oct 10, 11:33 am, Gabriel Gilini <[EMAIL PROTECTED]> wrote:
> So, are there any guidelines to write a Shell Test Case?
>
> On 16 set, 18:05, mark_story <[EMAIL PROTECTED]> wrote:
>
> > Jeurgen, Testingshellclasses is a bit tricky right now
> > App::import() currently does not let you target shells so you have to
> > include them regular php style. We are working on ways of improving
> > this though, as testing shells is a big pain right now.
>
> > -Mark
>
> > On Sep 16, 9:45 am, JuergenRiemer <[EMAIL PROTECTED]> wrote:
>
> > > Hi,
>
> > > I do the following to unittestashellscript
> > > [ learn.test.php ] put in a folder "tests/cases/shells" (that I
> > > created)
> > > <?php
> > > App::import( 'Shell', 'Learn' );
>
> > > class LearnShellTest extends CakeTestCase {
>
> > > function setUp(){
> > > $this->LearnShell = new LearnShell();
> > > }
>
> > > function testOne(){
>
> > > $this->LearnShell->testFunc();
> > > }}
>
> > > ?>
>
> > > how ever it does not find the Class LearnShell.
> > > Now before I get deeper into it... can anyone point me to the proper
> > > solution?
> > > thx
> > > Jeurgen
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---