/** * @group accessors */ public function testHasPrivate() { $subKey = new Crypt_GPG_SubKey(array('id' => '8C37DBD2A01B7976', 'algorithm' => Crypt_GPG_SubKey::ALGORITHM_DSA, 'fingerprint' => '8D2299D9C5C211128B32BBB0C097D9EC94C06363', 'length' => 1024, 'creation' => 1221785858, 'expiration' => 1421785858, 'canSign' => true, 'canEncrypt' => false, 'hasPrivate' => true)); $this->assertTrue($subKey->hasPrivate()); $subKey = new Crypt_GPG_SubKey(array('id' => '8C37DBD2A01B7976', 'algorithm' => Crypt_GPG_SubKey::ALGORITHM_DSA, 'fingerprint' => '8D2299D9C5C211128B32BBB0C097D9EC94C06363', 'length' => 1024, 'creation' => 1221785858, 'expiration' => 1421785858, 'canSign' => true, 'canEncrypt' => false, 'hasPrivate' => false)); $this->assertFalse($subKey->hasPrivate()); }