33 require_once (
'../../../tests/fossologyTestCase.php');
34 require_once (
'../../../tests/TestEnvironment.php');
41 function testUploadUrl()
45 print
"starting UploadUrlTest\n";
49 $loggedIn = $this->mybrowser->get($URL);
50 $this->assertTrue($this->myassertText($loggedIn,
'/Upload/'));
51 $this->assertTrue($this->myassertText($loggedIn,
'/From URL/'));
52 $page = $this->mybrowser->get(
"$URL?mod=upload_url");
53 $this->assertTrue($this->myassertText($page,
'/Upload from URL/'));
54 $this->assertTrue($this->myassertText($page,
'/Enter the URL to the file/'));
58 $FolderId = $this->
getFolderId(
'Basic-Testing', $page,
'folder');
59 $this->assertTrue($this->mybrowser->setField(
'folder', $FolderId));
60 $simpletest =
'http://downloads.sourceforge.net/simpletest/simpletest_1.0.1.tar.gz';
61 $this->assertTrue($this->mybrowser->setField(
'geturl', $simpletest));
62 $desc =
'File uploaded by test UploadUrlTest';
63 $this->assertTrue($this->mybrowser->setField(
'description',
"$desc"));
65 $upload_name =
'TestUploadUrl-' .
"$pid";
66 $this->assertTrue($this->mybrowser->setField(
'name', $upload_name));
68 $page = $this->mybrowser->clickSubmit(
'Upload!');
69 $this->assertTrue($page);
71 $this->assertTrue($this->myassertText($page,
'/has been scheduled. It is/'));
getFolderId($folderName, $page, $selectName)
Login($User=NULL, $Password=NULL)