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\View\Helper; |
||
3 | |||
4 | use Redaxscript\Tests\TestCaseAbstract; |
||
5 | use Redaxscript\View\Helper\Byline; |
||
6 | |||
7 | /** |
||
8 | * BylineTest |
||
9 | * |
||
10 | * @since 4.0.0 |
||
11 | * |
||
12 | * @package Redaxscript |
||
13 | * @category Tests |
||
14 | * @author Henry Ruhs |
||
15 | * |
||
16 | * @covers Redaxscript\View\Helper\Byline |
||
17 | */ |
||
18 | |||
19 | class BylineTest extends TestCaseAbstract |
||
20 | { |
||
21 | /** |
||
22 | * setUp |
||
23 | * |
||
24 | * @since 4.0.0 |
||
25 | */ |
||
26 | |||
27 | public function setUp() : void |
||
28 | { |
||
29 | parent::setUp(); |
||
30 | $optionArray = |
||
31 | [ |
||
32 | 'adminName' => 'Test', |
||
33 | 'adminUser' => 'test', |
||
34 | 'adminPassword' => 'test', |
||
35 | 'adminEmail' => '[email protected]' |
||
36 | ]; |
||
37 | $installer = $this->installerFactory(); |
||
0 ignored issues
–
show
|
|||
38 | $installer->init(); |
||
39 | $installer->rawCreate(); |
||
40 | $installer->insertSettings($optionArray); |
||
41 | } |
||
42 | |||
43 | /** |
||
44 | * tearDown |
||
45 | * |
||
46 | * @since 4.0.0 |
||
47 | */ |
||
48 | |||
49 | public function tearDown() : void |
||
50 | { |
||
51 | $this->dropDatabase(); |
||
0 ignored issues
–
show
The method
dropDatabase() does not seem to exist on object<Redaxscript\Tests\View\Helper\BylineTest> .
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...
|
|||
52 | } |
||
53 | |||
54 | /** |
||
55 | * testRender |
||
56 | * |
||
57 | * @since 4.0.0 |
||
58 | * |
||
59 | * @param int $date |
||
60 | * @param string $author |
||
61 | * @param array $optionArray |
||
62 | * @param string $expect |
||
63 | * |
||
64 | * @dataProvider providerAutoloader |
||
65 | */ |
||
66 | |||
67 | public function testRender(int $date = null, string $author = null, array $optionArray = [], string $expect = null) : void |
||
68 | { |
||
69 | /* setup */ |
||
70 | |||
71 | $byline = new Byline($this->_registry, $this->_language); |
||
72 | $byline->init($optionArray); |
||
73 | |||
74 | /* actual */ |
||
75 | |||
76 | $actual = $byline->render($date, $author); |
||
77 | |||
78 | /* compare */ |
||
79 | |||
80 | $this->assertEquals($expect, $actual); |
||
81 | } |
||
82 | } |
||
83 |
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.