Doctrine\Tests\Search\SearchManagerTest::setUp PHP Method

setUp() protected method

This method is called before a test is executed.
protected setUp ( )
    protected function setUp()
    {
        $this->metadataFactory = $this->getMock('Doctrine\\Search\\Mapping\\ClassMetadataFactory');
        $this->searchClient = $this->getMockBuilder('Doctrine\\Search\\ElasticSearch\\Client')->disableOriginalConstructor()->getMock();
        $this->configuration = $this->getMock('Doctrine\\Search\\Configuration');
        $this->configuration->expects($this->once())->method('getClassMetadataFactory')->will($this->returnValue($this->metadataFactory));
        $this->configuration->expects($this->once())->method('getMetadataCacheImpl')->will($this->returnValue($this->getMock('Doctrine\\Common\\Cache\\ArrayCache')));
        $this->evm = new EventManager();
        $this->sm = new SearchManager($this->configuration, $this->searchClient, $this->evm);
    }