Skip to content

Commit 7c00e2c

Browse files
committed
Fix tests
1 parent 15dd9f4 commit 7c00e2c

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

tests/libraries/TwigHelperTest.php

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ public static function setUpBeforeClass()
66
{
77
parent::setUpBeforeClass();
88
$CI =& get_instance();
9-
$CI->load->library('Twig');
9+
$CI->load->library('twig');
1010
$CI->load->helper('url_helper');
1111
}
1212

@@ -34,15 +34,11 @@ public function setUp()
3434

3535
public function test_safe_anchor()
3636
{
37-
$safe_anchor = ReflectionHelper::getPrivateMethodInvoker(
38-
$this->obj, 'safe_anchor'
39-
);
40-
41-
$actual = $safe_anchor('news/local/123', 'My News', array('title' => 'The best news!'));
37+
$actual = $this->obj->safe_anchor('news/local/123', 'My News', array('title' => 'The best news!'));
4238
$expected = '<a href="http://localhost/index.php/news/local/123" title="The best news!">My News</a>';
4339
$this->assertEquals($expected, $actual);
4440

45-
$actual = $safe_anchor('news/local/123', '<s>abc</s>', array('<s>name</s>' => '<s>val</s>'));
41+
$actual = $this->obj->safe_anchor('news/local/123', '<s>abc</s>', array('<s>name</s>' => '<s>val</s>'));
4642
$expected = '<a href="http://localhost/index.php/news/local/123" &lt;s&gt;name&lt;/s&gt;="&lt;s&gt;val&lt;/s&gt;">&lt;s&gt;abc&lt;/s&gt;</a>';
4743
$this->assertEquals($expected, $actual);
4844
}

0 commit comments

Comments
 (0)