/**
  * Creates a new delta update subscriber.
  */
 protected function setUp()
 {
     parent::setUp();
     $this->file = $this->dir . '/test.php';
     touch($this->file);
     $this->iterator = new ArrayIterator(array($this->file => new SplFileInfo($this->file)));
     $this->subscriber = new DeltaUpdateSubscriber();
     $this->delta = new DeltaUpdateIterator($this->iterator, $this->subscriber, $this->builder, $this->dir . '/');
 }
 /**
  * Creates a new test processor and subscriber instance.
  */
 protected function setUp()
 {
     parent::setUp();
     $this->processor = new CallbackProcessor(function ($file) {
         return (bool) preg_match('/\\.php$/', $file);
     }, function ($file, $contents) {
         return $contents . "\n\necho \"Hello, {$file}!\n\";";
     });
     $this->subscriber = new ProcessorSubscriber($this->processor);
 }
 /**
  * Creates a new instance of the subscriber for testing.
  */
 protected function setUp()
 {
     parent::setUp();
     $this->subscriber = new DeltaUpdateSubscriber();
 }
示例#4
0
 /**
  * Creates a new instance of the event.
  */
 protected function setUp()
 {
     parent::setUp();
     $this->event = new PreAddFileEvent($this->builder, $this->file, $this->local);
 }
 /**
  * Creates a new instance of the event.
  */
 protected function setUp()
 {
     parent::setUp();
     $this->event = new PreAddFromStringEvent($this->builder, $this->local, $this->contents);
 }
 /**
  * Creates a new instance of the event.
  */
 protected function setUp()
 {
     parent::setUp();
     $this->iterator = new ArrayIterator(array());
     $this->event = new PreBuildFromIteratorEvent($this->builder, $this->iterator, $this->base);
 }
 /**
  * Creates a new mock filter subscriber.
  */
 protected function setUp()
 {
     parent::setUp();
     $this->subscriber = $this->getMockBuilder('Box\\Component\\Builder\\Event\\Listener\\AbstractFilterSubscriber')->setMethods(array('isAllowed'))->getMockForAbstractClass();
 }
 /**
  * Creates a new instance of the event.
  */
 protected function setUp()
 {
     parent::setUp();
     $this->event = new PreBuildFromDirectoryEvent($this->builder, $this->dir, $this->filter);
 }
示例#9
0
 /**
  * Cleans up the temporary paths.
  */
 protected function tearDown()
 {
     $this->dispatcher = null;
     parent::tearDown();
 }