public function test_createWithSVNDirectories() { $_POST["creategroup"] = 0; $_POST["addmetogroup"] = 0; $_POST["admin"] = 0; $_POST['createsvndir'] = 1; $project = $this->create_project(); $this->assertFalse($project->userIsAdmin('god')); $this->assertNull($this->get_created_group()); $this->assertEquals(array(array('name' => 'branches', 'isDirectory' => true, 'path' => '/branches/'), array('name' => 'tags', 'isDirectory' => true, 'path' => '/tags/'), array('name' => 'trunk', 'isDirectory' => true, 'path' => '/trunk/')), USVN_SVNUtils::listSVN(Zend_Registry::get('config')->subversion->path . '/svn/Test', '/')); }
public function testCreateProjectWithoutGroupWithoutAdminButWithSvnDirectories() { $project = USVN_Project::createProject(array('projects_name' => 'InsertProjectOk', 'projects_start_date' => '1984-12-03 00:00:00'), "test", false, false, false, true); $table = new USVN_Db_Table_Projects(); $this->assertTrue($table->isAProject('InsertProjectOk'), "Le projet n'est pas cree"); $this->assertTrue(USVN_SVNUtils::isSVNRepository('tests/tmp/svn/InsertProjectOk'), "Le repository n'est pas cree"); $table = new USVN_Db_Table_Groups(); $this->assertFalse($table->isAGroup('InsertProjectOk'), "Le groupe est cree alors qu'il ne doit pas"); $this->assertFalse($project->userIsAdmin($this->_user)); $this->assertEquals(array(array('name' => 'branches', 'isDirectory' => true, 'path' => '/branches/'), array('name' => 'tags', 'isDirectory' => true, 'path' => '/tags/'), array('name' => 'trunk', 'isDirectory' => true, 'path' => '/trunk/')), USVN_SVNUtils::listSVN(Zend_Registry::get('config')->subversion->path . '/svn/InsertProjectOk', '/')); }