示例#1
0
 /**
  * @return void
  */
 public function test__toStringProxiesToToString()
 {
     $this->container[] = 'foo';
     $this->container[] = 'bar';
     $this->container[] = 'baz';
     $this->container->setPrefix('<ul><li>')->setSeparator('</li><li>')->setPostfix('</li></ul>');
     $value = $this->container->__toString();
     $this->assertEquals('<ul><li>foo</li><li>bar</li><li>baz</li></ul>', $value);
 }
 /**
  * @group ZF-12044
  */
 public function testContainerWithoutItemsShouldAlwaysReturnEmptyString()
 {
     $this->assertEquals('', (string) $this->container);
     $this->container->setIndent(4);
     $this->assertEquals('', (string) $this->container);
     $this->container->setPrefix('<ul><li>');
     $this->assertEquals('', (string) $this->container);
     $this->container->setSeparator('</li><li>');
     $this->assertEquals('', (string) $this->container);
     $this->container->setPrefix('</li></ul>');
     $this->assertEquals('', (string) $this->container);
 }