private function _getDumpedSymfonyContainerAsString(\Symfony\Component\DependencyInjection\ContainerBuilder $containerBuilder) { if ($this->_shouldLog) { $this->_logDebug('Preparing to dump container builder to string'); } $dumpConfig = array('class' => 'TubePressServiceContainer'); if (!isset($this->_containerDumper)) { $this->_containerDumper = new \Symfony\Component\DependencyInjection\Dumper\PhpDumper($containerBuilder); } $dumped = $this->_containerDumper->dump($dumpConfig); if ($this->_shouldLog) { $this->_logDebug(sprintf('Done dumping container builder to string. Check the HTML source to view the full' . ' container. <div style="display:none"><pre>%s</pre></div>', $dumped)); } return $dumped; }
/** * Tests that an empty container works properly. * * @covers ::dump * @covers ::getArray * @covers ::supportsMachineFormat */ public function testDumpForEmptyContainer() { $serialized_definition = $this->dumper->dump(); $this->assertEquals(serialize($this->containerDefinition), $serialized_definition); }