22 require_once (
'../../../tests/fossologyTestCase.php');
23 require_once (
'../../../tests/TestEnvironment.php');
30 function testUploadUrl()
34 print
"starting UploadUrlTest\n";
38 $loggedIn = $this->mybrowser->get($URL);
39 $this->assertTrue($this->myassertText($loggedIn,
'/Upload/'));
40 $this->assertTrue($this->myassertText($loggedIn,
'/From URL/'));
41 $page = $this->mybrowser->get(
"$URL?mod=upload_url");
42 $this->assertTrue($this->myassertText($page,
'/Upload from URL/'));
43 $this->assertTrue($this->myassertText($page,
'/Enter the URL to the file/'));
47 $FolderId = $this->
getFolderId(
'Basic-Testing', $page,
'folder');
48 $this->assertTrue($this->mybrowser->setField(
'folder', $FolderId));
49 $simpletest =
'http://downloads.sourceforge.net/simpletest/simpletest_1.0.1.tar.gz';
50 $this->assertTrue($this->mybrowser->setField(
'geturl', $simpletest));
51 $desc =
'File uploaded by test UploadUrlTest';
52 $this->assertTrue($this->mybrowser->setField(
'description',
"$desc"));
54 $upload_name =
'TestUploadUrl-' .
"$pid";
55 $this->assertTrue($this->mybrowser->setField(
'name', $upload_name));
57 $page = $this->mybrowser->clickSubmit(
'Upload!');
58 $this->assertTrue($page);
60 $this->assertTrue($this->myassertText($page,
'/has been scheduled. It is/'));
getFolderId($folderName, $page, $selectName)
Login($User=NULL, $Password=NULL)