예제 #1
0
 public function testMultiplePlaceholdersUseSameRegistry()
 {
     $this->assertTrue(Registry::isRegistered(PlaceholderRegistry::REGISTRY_KEY));
     $registry = Registry::get(PlaceholderRegistry::REGISTRY_KEY);
     $this->assertSame($registry, $this->placeholder->getRegistry());
     $placeholder = new Helper\Placeholder();
     $this->assertSame($registry, $placeholder->getRegistry());
     $this->assertSame($this->placeholder->getRegistry(), $placeholder->getRegistry());
 }
예제 #2
0
 public function testMultiplePlaceholdersUseSameRegistry()
 {
     $placeholder = new Helper\Placeholder();
     $this->assertSame($this->placeholder->getRegistry(), $placeholder->getRegistry());
 }
예제 #3
0
 public function testDefaultEmpty()
 {
     $this->_view->plugin('renderToPlaceholder')->__invoke('rendertoplaceholderscript.phtml', 'fooPlaceholder');
     $placeholder = new PlaceholderHelper();
     $this->assertEquals("Foo Bar" . "\n", $placeholder->__invoke('fooPlaceholder')->getValue());
 }
예제 #4
0
 /**
  * @return void
  */
 public function testPlaceholderRetrievesSameContainerOnSubsequentCalls()
 {
     $container1 = $this->placeholder->__invoke('foo');
     $container2 = $this->placeholder->__invoke('foo');
     $this->assertSame($container1, $container2);
 }