Ejemplo n.º 1
0
 /**
  * Test if the constructor works as expected.
  *
  * @return void
  */
 public function testConstructorWithPassedValues()
 {
     // initialize the subject with the passed values
     $subject = new Subject($principals = new ArrayList(), $publicCredentials = new ArrayList(), $privateCredentials = new ArrayList(), true);
     // assert the values
     $this->assertTrue($subject->isReadOnly());
     $this->assertSame($principals, $subject->getPrincipals());
     $this->assertSame($publicCredentials, $subject->getPublicCredentials());
     $this->assertSame($privateCredentials, $subject->getPrivateCredentials());
 }
Ejemplo n.º 2
0
 /**
  * Test the setter for the read only setter.
  *
  * @return void
  */
 public function testSetReadOnly()
 {
     $this->subject->setReadOnly();
     $this->assertTrue($this->subject->isReadOnly());
 }