summaryrefslogtreecommitdiffstats
path: root/apps/encryption/tests/lib/RequirementsCheckerTest.php
blob: 97ddd76b7503dd300e6d846b46eb74f50171b417 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<?php
/**
 * @author Clark Tomlinson  <fallen013@gmail.com>
 * @since 3/6/15, 10:36 AM
 * @link http:/www.clarkt.com
 * @copyright Clark Tomlinson © 2015
 *
 */

namespace OCA\Encryption\Tests;


use OCA\Encryption\RequirementsChecker;
use Test\TestCase;

class RequirementsCheckerTest extends TestCase {
	/**
	 * @var RequirementsChecker
	 */
	private $instance;

	/**
	 *
	 */
	protected function setUp() {
		parent::setUp();
		$log = $this->getMock('OCP\ILogger');
		$crypt = $this->getMockBuilder('OCA\Encryption\Crypt')
			->disableOriginalConstructor()
			->getMock();
		$crypt
		->method('getOpenSSLPkey')
		->will($this->returnValue(true));
		$this->instance = new RequirementsChecker($crypt, $log);
	}

	/**
	 *
	 */
	public function testCanCheckConfigration() {
		$this->assertTrue($this->instance->checkConfiguration());
	}

	/**
	 *
	 */
	public function testCanCheckRequiredExtensions() {
		$this->assertTrue($this->instance->checkExtensions());
	}

}