public function testEncryption() { $sec = new TSecurityManager(); $sec->init(null); try { $sec->setCryptAlgorithm('NotExisting'); $foo = $sec->encrypt('dummy'); self::fail('Expected TNotSupportedException not thrown'); } catch (TNotSupportedException $e) { self::assertEquals('NotExisting', $sec->getCryptAlgorithm()); } }