Skip CI_Encrypt tests if MCrypt is not available

Rel: #3185
diff --git a/tests/codeigniter/libraries/Encrypt_test.php b/tests/codeigniter/libraries/Encrypt_test.php
index a08db8e..ced7633 100644
--- a/tests/codeigniter/libraries/Encrypt_test.php
+++ b/tests/codeigniter/libraries/Encrypt_test.php
@@ -1,15 +1,21 @@
 <?php
-
+/**
+ * @requires extension mcrypt
+ */
 class Encrypt_test extends CI_TestCase {
 
 	public function set_up()
 	{
+		if ( ! extension_loaded('mcrypt'))
+		{
+			return;
+		}
+
 		$this->encrypt = new Mock_Libraries_Encrypt();
 		$this->ci_instance_var('encrypt', $this->encrypt);
 
 		$this->ci_set_config('encryption_key', "Encryptin'glike@boss!");
 		$this->msg = 'My secret message';
-		$this->mcrypt = extension_loaded('mcrypt');
 	}
 
 	// --------------------------------------------------------------------
@@ -40,12 +46,6 @@
 
 	public function test_default_cipher()
 	{
-		if ( ! $this->mcrypt)
-		{
-			$this->markTestSkipped('MCrypt not available');
-			return;
-		}
-
 		$this->assertEquals('rijndael-256', $this->encrypt->get_cipher());
 	}
 
@@ -53,12 +53,6 @@
 
 	public function test_set_cipher()
 	{
-		if ( ! $this->mcrypt)
-		{
-			$this->markTestSkipped('MCrypt not available');
-			return;
-		}
-
 		$this->encrypt->set_cipher(MCRYPT_BLOWFISH);
 		$this->assertEquals('blowfish', $this->encrypt->get_cipher());
 	}
@@ -67,12 +61,6 @@
 
 	public function test_default_mode()
 	{
-		if ( ! $this->mcrypt)
-		{
-			$this->markTestSkipped('MCrypt not available');
-			return;
-		}
-
 		$this->assertEquals('cbc', $this->encrypt->get_mode());
 	}
 
@@ -80,12 +68,6 @@
 
 	public function test_set_mode()
 	{
-		if ( ! $this->mcrypt)
-		{
-			$this->markTestSkipped('MCrypt not available');
-			return;
-		}
-
 		$this->encrypt->set_mode(MCRYPT_MODE_CFB);
 		$this->assertEquals('cfb', $this->encrypt->get_mode());
 	}