Ejemplo n.º 1
0
 protected function setUp()
 {
     $advisors =& $this->advisors;
     $advisors = array();
     $this->container = $this->getMock('Go\\Core\\AspectContainer');
     $this->container->expects($this->any())->method('getByTag')->will($this->returnValueMap(array(array('advisor', &$this->advisors), array('aspect', array()))));
     $this->container->expects($this->any())->method('registerAdvisor')->will($this->returnCallback(function ($advisor, $id) use(&$advisors) {
         $advisors[$id] = $advisor;
     }));
     $reader = $this->getMock('Doctrine\\Common\\Annotations\\Reader');
     $loader = $this->getMock('Go\\Core\\AspectLoader', array(), array($this->container, $reader));
     $this->adviceMatcher = new AdviceMatcher($loader, $this->container);
 }