/** * Test if the constructor works as expected. * * @return void */ public function testConstructor() { $this->assertFalse($this->subject->isReadOnly()); $this->assertInstanceOf('AppserverIo\\Collections\\CollectionInterface', $this->subject->getPrincipals()); $this->assertInstanceOf('AppserverIo\\Collections\\CollectionInterface', $this->subject->getPublicCredentials()); $this->assertInstanceOf('AppserverIo\\Collections\\CollectionInterface', $this->subject->getPrivateCredentials()); }
/** * 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()); }