Sensio\Bundle\GeneratorBundle\Tests\Command\GenerateCommandTest::getBundle PHP Method

getBundle() protected method

protected getBundle ( )
    protected function getBundle()
    {
        $bundle = $this->getMock('Symfony\Component\HttpKernel\Bundle\BundleInterface');
        $bundle
            ->expects($this->any())
            ->method('getPath')
            ->will($this->returnValue(sys_get_temp_dir()))
        ;

        return $bundle;
    }

Usage Example

 protected function getBundle()
 {
     $bundle = parent::getBundle();
     $bundle->expects($this->any())->method('getName')->will($this->returnValue('AcmeBlogBundle'));
     return $bundle;
 }