Completed
Push — master ( e090e4...18d79e )
by Damian
02:26
created

tests/checks/HasFunctionCheckTest.php (3 issues)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
3
/**
4
 * @mixin PHPUnit_Framework_TestCase
5
 */
6 View Code Duplication
class HasFunctionCheckTest extends SapphireTest {
0 ignored issues
show
As per PSR2, the opening brace for this class should be on a new line.
Loading history...
7
	public function testCheckReportsMissingFunctions() {
8
		$check = new HasFunctionCheck('foo');
9
10
		$expected = array(
11
			EnvironmentCheck::ERROR,
12
			'foo() doesn\'t exist',
13
		);
14
15
		$this->assertEquals($expected, $check->check());
0 ignored issues
show
The method assertEquals() does not seem to exist on object<HasFunctionCheckTest>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
16
	}
17
18
	public function testCheckReportsFoundFunctions() {
19
		$check = new HasFunctionCheck('class_exists');
20
21
		$expected = array(
22
			EnvironmentCheck::OK,
23
			'class_exists() exists',
24
		);
25
26
		$this->assertEquals($expected, $check->check());
0 ignored issues
show
The method assertEquals() does not seem to exist on object<HasFunctionCheckTest>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
27
	}
28
}
29