コード例 #1
0
 public function testAbstractReturnsInvalidKeyLength()
 {
     $this->setExpectedException(UnexpectedValueException::class, 'Key length must be either 40 or 128');
     $this->getAbstractEncryption(100)->__construct('', '', '', Permissions::allowNothing());
 }
コード例 #2
0
 /**
  * {@inheritdoc}
  */
 protected function createEncryption($userPassword, $ownerPassword = null, Permissions $userPermissions = null)
 {
     return new Pdf16Encryption(md5('test', true), $userPassword, $ownerPassword ?: $userPassword, $userPermissions ?: Permissions::allowNothing());
 }
コード例 #3
0
ファイル: PermissionsTest.php プロジェクト: sachsy/BaconPdf
 public function testZeroPermissions()
 {
     $permissions = Permissions::allowNothing();
     $this->assertSame(0, $permissions->toInt(2));
     $this->assertSame(0, $permissions->toInt(3));
 }