started to fill out the set_attribute stub
[catagits/HTML-Zoom.git] / t / synopsis / filterbuilder.t
index 59048ae..9fc9f41 100644 (file)
@@ -19,18 +19,22 @@ my $body = HTML::Zoom
     ->from_html(<<BODY);
 <div id="stuff">
     <p>Well Now</p>
-    <p>Is the Time</p>
+    <p id="p2">Is the Time</p>
 </div>
 BODY
 
 my $output =  $root
-->select('title')
-->replace_content('Hello World')
-->select('body')
-->replace_content($body)
-->select('p')
-->set_attribute(class=>'para')
-->to_html;
+  ->select('title')
+  ->replace_content('Hello World')
+  ->select('body')
+  ->replace_content($body)
+  ->then
+  ->set_attribute(class=>'main')
+  ->select('p')
+  ->set_attribute(class=>'para')
+  ->select('#p2')
+  ->set_attribute(class=>'para2')
+  ->to_html;
 
 
 my $expect = <<HTML;
@@ -38,9 +42,9 @@ my $expect = <<HTML;
   <head>
     <title>Hello World</title>
   </head>
-  <body><div id="stuff">
+  <body class="main"><div id="stuff">
     <p class="para">Well Now</p>
-    <p class="para">Is the Time</p>
+    <p id="p2" class="para2">Is the Time</p>
 </div>
 </body>
 </html>