FOSSology  4.4.0
Open Source License Compliance by Open Source Software
cliParamsTest4Wget Class Reference
Inheritance diagram for cliParamsTest4Wget:
Inheritance graph
Collaboration diagram for cliParamsTest4Wget:
Collaboration graph

Public Member Functions

 testDownloadDirHasChildDirLevel0 ()
 download one dir(one url) More...
 
 testDownloadDirHasNoChildDirLevel0 ()
 Download one dir(one url) More...
 
 testDownloadDirHasChildDirLevel1 ()
 Download one dir(one url) More...
 
 testDownloadDirCurrentDirLevel0 ()
 Download one file(one url) More...
 
 testDownloadURLDesAbnormal ()
 download one file(one url) More...
 
 testDownloadAcceptRejectType1 ()
 download one dir(one url) More...
 
 testtDownloadAcceptRejectType2 ()
 download one dir(one url) More...
 
 change_proxy ($proxy_type, $porxy)
 Change proxy to test.
 
 test_proxy_ftp ()
 Test proxy ftp. More...
 
 test_proxy_http ()
 Test proxy http and no proxy. More...
 
 test_proxy_https ()
 Test proxy https. More...
 

Public Attributes

 $WGET_PATH = ""
 

Protected Member Functions

 setUp ()
 
 tearDown ()
 Clean the env. More...
 

Private Attributes

 $testDb
 

Detailed Description

@biref Test wget agent from cli

Definition at line 27 of file cliParamsTest4WgetAgent.php.

Member Function Documentation

◆ setUp()

cliParamsTest4Wget::setUp ( )
protected

@biref Initialization

See also
PHPUnit_Framework_TestCase::setUp()

Definition at line 38 of file cliParamsTest4WgetAgent.php.

◆ tearDown()

cliParamsTest4Wget::tearDown ( )
protected

Clean the env.

See also
PHPUnit_Framework_TestCase::tearDown()

Definition at line 300 of file cliParamsTest4WgetAgent.php.

◆ test_proxy_ftp()

cliParamsTest4Wget::test_proxy_ftp ( )

Test proxy ftp.

Test:
  1. Set FTP Proxy
  2. Download a FTP file behind proxy
  3. Check if file was downloaded

Definition at line 241 of file cliParamsTest4WgetAgent.php.

◆ test_proxy_http()

cliParamsTest4Wget::test_proxy_http ( )

Test proxy http and no proxy.

Test:
  1. Set HTTP and NO_PROXY
  2. Download files behind proxy
  3. Check if the files are downloaded

Definition at line 260 of file cliParamsTest4WgetAgent.php.

◆ test_proxy_https()

cliParamsTest4Wget::test_proxy_https ( )

Test proxy https.

Test:
  1. Set HTTPS proxy
  2. Download https file behind proxy
  3. Check if file downloaded

Definition at line 284 of file cliParamsTest4WgetAgent.php.

◆ testDownloadAcceptRejectType1()

cliParamsTest4Wget::testDownloadAcceptRejectType1 ( )

download one dir(one url)

Test:
  1. Create command to download a directory
  2. Set level as 2
  3. Accept fossology*, reject few rpm files
  4. Check if other files are downloaded
  5. Check if the rpms are not downloaded

Definition at line 189 of file cliParamsTest4WgetAgent.php.

◆ testDownloadDirCurrentDirLevel0()

cliParamsTest4Wget::testDownloadDirCurrentDirLevel0 ( )

Download one file(one url)

Test:
  1. Create command to download a file
  2. Set level as 0
  3. Do not specify the output destination, so downloaded file under current directory
  4. Check if the file was downloaded

Definition at line 147 of file cliParamsTest4WgetAgent.php.

◆ testDownloadDirHasChildDirLevel0()

cliParamsTest4Wget::testDownloadDirHasChildDirLevel0 ( )

download one dir(one url)

Under this direcotry, also having other directory(s)

Test:
  1. Create command to download from a directory
  2. Set level 0, accept rpm
  3. Reject few rpms
  4. Check if an rpm is downloaded
  5. Check if the rejected rpms are not downloaded

Definition at line 79 of file cliParamsTest4WgetAgent.php.

◆ testDownloadDirHasChildDirLevel1()

cliParamsTest4Wget::testDownloadDirHasChildDirLevel1 ( )

Download one dir(one url)

Under this direcotry, also having other directory(s). Since the level is 1, so can not download the files under url/dir(s)/, just download the directory(s) under url/

Test:
  1. Create command to download a directory
  2. Set level to 1, accept rpm, reject few rpm
  3. Check if the rpm are not downloaded
  4. Check if lower level directory are not downloaded

Definition at line 125 of file cliParamsTest4WgetAgent.php.

◆ testDownloadDirHasNoChildDirLevel0()

cliParamsTest4Wget::testDownloadDirHasNoChildDirLevel0 ( )

Download one dir(one url)

Under this directory, having no other directory(s), having several files

Test:
  1. Create command to download from a directory
  2. Set level as 0, accept deb, reject fossology-* files
  3. Check if a deb file is downloaded
  4. Check if the fossology-* files are not downloaded

Definition at line 102 of file cliParamsTest4WgetAgent.php.

◆ testDownloadURLDesAbnormal()

cliParamsTest4Wget::testDownloadURLDesAbnormal ( )

download one file(one url)

This url and destination are very special, the path has some blank spaces, '(' and ')'

Test:
  1. Create command to download a file
  2. Set level as 0
Todo:
Ignore this test case, the test data is not existed
Note
This test case can not pass, because the test data is not existed. so ignore this test case.

Definition at line 169 of file cliParamsTest4WgetAgent.php.

◆ testtDownloadAcceptRejectType2()

cliParamsTest4Wget::testtDownloadAcceptRejectType2 ( )

download one dir(one url)

Test:
  1. Create command to download a directory
  2. Set level as 1
  3. Accept fossology-scheduler_2.0.0*, reject gz, fossology-scheduler_2.0.0-1_i386* files
  4. Check if other files are downloaded
  5. Check if rejected files are not downloaded

Definition at line 210 of file cliParamsTest4WgetAgent.php.


The documentation for this class was generated from the following file: