gluon-web-remote

Web remote Administration for big size of gluon routers
git clone git://archive.git.mtrnord.blog/MTRNord/gluon-web-remote.git
Log | Files | Refs | README

PublicKeyFileTest.php (1086B)


      1 <?php
      2 
      3 
      4 namespace Ssh\Authentication;
      5 
      6 /**
      7  * @covers \Ssh\Authentication\PublicKeyFile
      8  */
      9 class PublicKeyFileTest extends \PHPUnit_Framework_TestCase
     10 {
     11     public function testClass() {
     12         $auth = new PublicKeyFile('user', 'path/public.key', 'path/private.key', 'passPhrase');
     13         $this->assertInstanceOf('\Ssh\Authentication', $auth);
     14 
     15         $this->assertAttributeEquals('user', 'username', $auth);
     16         $this->assertAttributeEquals('path/public.key', 'publicKeyFile', $auth);
     17         $this->assertAttributeEquals('path/private.key', 'privateKeyFile', $auth);
     18         $this->assertAttributeEquals('passPhrase', 'passPhrase', $auth);
     19     }
     20 
     21     public function testClassOptionals() {
     22         $auth = new PublicKeyFile('user', 'path/public.key', 'path/private.key');
     23 
     24         $this->assertAttributeEquals('user', 'username', $auth);
     25         $this->assertAttributeEquals('path/public.key', 'publicKeyFile', $auth);
     26         $this->assertAttributeEquals('path/private.key', 'privateKeyFile', $auth);
     27         $this->assertAttributeEquals(null, 'passPhrase', $auth);
     28     }
     29 }
     30