Alternc  latest
Alternc logiel libre pour l'h├ębergement
 All Classes Namespaces Files Functions Variables Pages
m_htaTest Class Reference

Generated by PHPUnit_SkeletonGenerator 1.2.1 on 2014-03-13 at 15:55:58. More...

+ Inheritance diagram for m_htaTest:

Public Member Functions

 testM_webaccess ()
 m_hta::m_webaccess More...
 
 testAlternc_password_policy ()
 m_hta::alternc_password_policy More...
 
 testHook_menu ()
 m_hta::hook_menu More...
 
 testCreateDir ()
 m_hta::CreateDir More...
 
 testListDir ()
 m_hta::ListDir More...
 
 testIs_protected ()
 m_hta::is_protected More...
 
 testGet_hta_detail ()
 m_hta::get_hta_detail More...
 
 testDelDir ()
 m_hta::DelDir More...
 
 testDelDirNotEmpty ()
 m_hta::DelDir More...
 
 testAdd_user ()
 m_hta::add_user More...
 
 testDel_user ()
 m_hta::del_user More...
 
 testChange_pass ()
 m_hta::change_pass More...
 
 test_reading_htaccess ()
 m_hta::_reading_htaccess More...
 

Public Attributes

const PATH_HTACCESS = "/tmp/.htaccess"
 
const PATH_HTPASSWD = "/tmp/.htpasswd"
 

Protected Member Functions

 setUp ()
 Sets up the fixture, for example, opens a network connection. More...
 
 tearDown ()
 Tears down the fixture, for example, closes a network connection. More...
 

Protected Attributes

 $object
 

Detailed Description

Generated by PHPUnit_SkeletonGenerator 1.2.1 on 2014-03-13 at 15:55:58.

Definition at line 5 of file m_htaTest.php.

Member Function Documentation

m_htaTest::setUp ( )
protected

Sets up the fixture, for example, opens a network connection.

This method is called before a test is executed.

Definition at line 19 of file m_htaTest.php.

20  {
21  parent::setUp();
22  touch(self::PATH_HTACCESS);
23  touch(self::PATH_HTPASSWD);
24  $file_content = "AuthUserFile \"/tmp/.htpasswd\"\nAuthName \"Restricted area\"\nAuthType Basic\nrequire valid-user\n";
25  file_put_contents(self::PATH_HTACCESS,$file_content);
26  $this->object = new m_hta;
27  }
This class handle folder web restricted access through .htaccess/.htpassword files.
Definition: m_hta.php:27
m_htaTest::tearDown ( )
protected

Tears down the fixture, for example, closes a network connection.

This method is called after a test is executed.

Definition at line 33 of file m_htaTest.php.

34  {
35  parent::tearDown();
36  if(file_exists(self::PATH_HTACCESS)){
37  unlink (self::PATH_HTACCESS);
38  }
39  if(file_exists(self::PATH_HTPASSWD)){
40  unlink (self::PATH_HTPASSWD);
41  }
42  }
m_htaTest::test_reading_htaccess ( )

m_hta::_reading_htaccess

Todo:
Implement test_reading_htaccess().

Definition at line 192 of file m_htaTest.php.

193  {
194  // Remove the following lines when you implement this test.
195  $this->markTestIncomplete(
196  'This test has not been implemented yet.'
197  );
198  }
m_htaTest::testAdd_user ( )

m_hta::add_user

Todo:
Implement testAdd_user().

Definition at line 156 of file m_htaTest.php.

157  {
158  // Remove the following lines when you implement this test.
159  $this->markTestIncomplete(
160  'This test has not been implemented yet.'
161  );
162  }
m_htaTest::testAlternc_password_policy ( )

m_hta::alternc_password_policy

Todo:
Implement testAlternc_password_policy().

Definition at line 60 of file m_htaTest.php.

61  {
62  // Remove the following lines when you implement this test.
63  $this->markTestIncomplete(
64  'This test has not been implemented yet.'
65  );
66  }
m_htaTest::testChange_pass ( )

m_hta::change_pass

Todo:
Implement testChange_pass().

Definition at line 180 of file m_htaTest.php.

181  {
182  // Remove the following lines when you implement this test.
183  $this->markTestIncomplete(
184  'This test has not been implemented yet.'
185  );
186  }
m_htaTest::testCreateDir ( )

m_hta::CreateDir

Todo:
Implement testCreateDir().

Definition at line 84 of file m_htaTest.php.

85  {
86  // Remove the following lines when you implement this test.
87  $this->markTestIncomplete(
88  'This test has not been implemented yet.'
89  );
90  }
m_htaTest::testDel_user ( )

m_hta::del_user

Todo:
Implement testDel_user().

Definition at line 168 of file m_htaTest.php.

169  {
170  // Remove the following lines when you implement this test.
171  $this->markTestIncomplete(
172  'This test has not been implemented yet.'
173  );
174  }
m_htaTest::testDelDir ( )

m_hta::DelDir

Definition at line 131 of file m_htaTest.php.

132  {
133  $result = $this->object->DelDir("/tmp",TRUE);
134  $this->assertTrue($result);
135  $this->assertFileNotExists(self::PATH_HTACCESS);
136  $this->assertFileNotExists(self::PATH_HTPASSWD);
137  }
m_htaTest::testDelDirNotEmpty ( )

m_hta::DelDir

Definition at line 142 of file m_htaTest.php.

143  {
144  file_put_contents(self::PATH_HTACCESS, "\nphpunit", FILE_APPEND);
145  $result = $this->object->DelDir("/tmp",TRUE);
146  $this->assertTrue($result);
147  $this->assertFileExists(self::PATH_HTACCESS);
148  $this->assertFileNotExists(self::PATH_HTPASSWD);
149  $this->assertTrue("phpunit" == trim(file_get_contents(self::PATH_HTACCESS)));
150  }
m_htaTest::testGet_hta_detail ( )

m_hta::get_hta_detail

Todo:
Implement testGet_hta_detail().

Definition at line 120 of file m_htaTest.php.

121  {
122  // Remove the following lines when you implement this test.
123  $this->markTestIncomplete(
124  'This test has not been implemented yet.'
125  );
126  }
m_htaTest::testHook_menu ( )

m_hta::hook_menu

Todo:
Implement testHook_menu().

Definition at line 72 of file m_htaTest.php.

73  {
74  // Remove the following lines when you implement this test.
75  $this->markTestIncomplete(
76  'This test has not been implemented yet.'
77  );
78  }
m_htaTest::testIs_protected ( )

m_hta::is_protected

Todo:
Implement testIs_protected().

Definition at line 108 of file m_htaTest.php.

109  {
110  // Remove the following lines when you implement this test.
111  $this->markTestIncomplete(
112  'This test has not been implemented yet.'
113  );
114  }
m_htaTest::testListDir ( )

m_hta::ListDir

Todo:
Implement testListDir().

Definition at line 96 of file m_htaTest.php.

97  {
98  // Remove the following lines when you implement this test.
99  $this->markTestIncomplete(
100  'This test has not been implemented yet.'
101  );
102  }
m_htaTest::testM_webaccess ( )

m_hta::m_webaccess

Todo:
Implement testM_webaccess().

Definition at line 48 of file m_htaTest.php.

49  {
50  // Remove the following lines when you implement this test.
51  $this->markTestIncomplete(
52  'This test has not been implemented yet.'
53  );
54  }

Member Data Documentation

m_htaTest::$object
protected

Definition at line 10 of file m_htaTest.php.

const m_htaTest::PATH_HTACCESS = "/tmp/.htaccess"

Definition at line 12 of file m_htaTest.php.

const m_htaTest::PATH_HTPASSWD = "/tmp/.htpasswd"

Definition at line 13 of file m_htaTest.php.


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