ControllerHasHelpersTest::testDynamicCallHelper()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 2
c 0
b 0
f 0
dl 0
loc 5
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Nip\Controllers\Tests\Traits;
4
5
use Nip\Controllers\Controller;
6
use Nip\Controllers\Tests\AbstractTest;
7
8
/**
9
 * Class ControllerHasHelpersTest
10
 * @package Nip\Tests\Helpers
11
 */
12
class ControllerHasHelpersTest extends AbstractTest
13
{
14
    public function testDynamicCallHelper()
15
    {
16
        $controller = new Controller();
17
18
        static::assertInstanceOf('Nip_Helper_Url', $controller->Url());
0 ignored issues
show
Deprecated Code introduced by
The function Nip\Controllers\Controller::Url() has been deprecated: use \Nip\url() instead ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-deprecated  annotation

18
        static::assertInstanceOf('Nip_Helper_Url', /** @scrutinizer ignore-deprecated */ $controller->Url());

This function has been deprecated. The supplier of the function has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.

Loading history...
19
    }
20
21
    public function testGetHelper()
22
    {
23
        $controller = new Controller();
24
25
        static::assertInstanceOf('Nip_Helper_Url', $controller->getHelper('Url'));
26
    }
27
}
28