eZ\Publish\Core\MVC\Symfony\SiteAccess\Tests\Compound\CompoundAndTest::testSetRequest PHP Method

testSetRequest() public method

public testSetRequest ( )
    public function testSetRequest()
    {
        $compoundMatcher = new LogicalAnd(array(array('matchers' => array('Map\\URI' => array('eng' => true), 'Map\\Host' => array('fr.ezpublish.dev' => true)), 'match' => 'fr_eng')));
        $matcher1 = $this->getMock('eZ\\Publish\\Core\\MVC\\Symfony\\SiteAccess\\Matcher');
        $matcher2 = $this->getMock('eZ\\Publish\\Core\\MVC\\Symfony\\SiteAccess\\Matcher');
        $this->matcherBuilder->expects($this->exactly(2))->method('buildMatcher')->will($this->onConsecutiveCalls($matcher1, $matcher2));
        $request = $this->getMock('eZ\\Publish\\Core\\MVC\\Symfony\\Routing\\SimplifiedRequest');
        $matcher1->expects($this->once())->method('setRequest')->with($request);
        $matcher2->expects($this->once())->method('setRequest')->with($request);
        $compoundMatcher->setRequest($this->getMock('eZ\\Publish\\Core\\MVC\\Symfony\\Routing\\SimplifiedRequest'));
        $compoundMatcher->setMatcherBuilder($this->matcherBuilder);
        $compoundMatcher->setRequest($request);
    }