Completed
Push — master ( 0ea243...da58d4 )
by Henry
10:25 queued 33s
created

tests/unit/Head/TitleTest.php (1 issue)

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
namespace Redaxscript\Tests\Head;
3
4
use Redaxscript\Head;
5
use Redaxscript\Tests\TestCaseAbstract;
6
7
/**
8
 * TitleTest
9
 *
10
 * @since 3.0.0
11
 *
12
 * @package Redaxscript
13
 * @category Tests
14
 * @author Balázs Szilágyi
15
 *
16
 * @covers Redaxscript\Head\HeadAbstract
17
 * @covers Redaxscript\Head\Title
18
 */
19
20
class TitleTest extends TestCaseAbstract
21
{
22
	/**
23
	 * testRender
24
	 *
25
	 * @since 3.0.0
26
	 *
27
	 * @param string $text
28
	 * @param string $expect
29
	 *
30
	 * @dataProvider providerAutoloader
31
	 */
32
33
	public function testRender(string $text= null, string $expect = null) : void
34
	{
35
		/* setup */
36
37
		$title = new Head\Title($this->_registry);
0 ignored issues
show
The call to Title::__construct() has too many arguments starting with $this->_registry.

This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.

If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress.

In this case you can add the @ignore PhpDoc annotation to the duplicate definition and it will be ignored.

Loading history...
38
39
		/* actual */
40
41
		$actual = $title->render($text);
42
43
		/* compare */
44
45
		$this->assertEquals($expect, $actual);
46
	}
47
}
48