How can I test my view's html that have formatting(line breaks,
indenting) using assertTags? Here's the problem I'm running to:

When I create html like this inside one of my views:

<p>
    <a href="index">User 1</a>
</p>

And then run the assertTags method like so:

$this->assertTags($result, array(
                        'p'=>array(),
                        'a'=>array('href'=>'index'),
                        'User 1',
                        '/a',
                        '/p'
                ));

This will fail because of the line breaks in the html. If I change my
html to have zero linebreaks, all on one line:

<p><a href="index">User 1</a></p>

It passes just fine.

Do I need to somehow include these line breaks in my assertion? I
don't know how to do this.

Thanks for any help.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to