public function setUp()
 {
     parent::setUp();
     $this->event = $this->getMockBuilder('Tuleap\\ProFTPd\\SystemEvent\\PROFTPD_DIRECTORY_CREATE')->setMethods(array('done'))->disableOriginalConstructor()->getMock();
     $this->backend = $this->getMockBuilder('Backend')->disableOriginalConstructor()->getMock();
     $this->acl_updater = $this->getMockBuilder('Tuleap\\ProFTPd\\Admin\\ACLUpdater')->disableOriginalConstructor()->getMock();
     $this->group_unix_name = "group_name";
     $this->ftp_directory = '/var/tmp';
     $this->path = $this->ftp_directory . "/" . $this->group_unix_name;
     $GLOBALS['sys_http_user'] = '******';
     $this->event->setParameters($this->group_unix_name);
     $this->event->injectDependencies($this->backend, $this->acl_updater, $this->ftp_directory);
 }
Exemplo n.º 2
0
 public function testItMarksAsDone()
 {
     $this->event->setParameters($this->group_unix_name);
     $this->event->expects($this->once())->method('done');
     $this->event->process();
 }