Skip to content

Commit 183d12c

Browse files
committed
test: update tests
1 parent 7f6df1d commit 183d12c

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

tests/CI4Twig/TwigHelperTest.php

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ public function test_anchor()
5555
'attributes' => ['title' => 'The best news!']
5656
]
5757
);
58-
// $expected = '<a href="http://localhost/index.php/news/local/123" title="The best news!">My News</a>'; // CI3
59-
$expected = '<a href="http://localhost/index.php/news/local/123" title="The&#x20;best&#x20;news&#x21;">My News</a>';
58+
// $expected = '<a href="http://localhost/index.php/news/local/123" title="The best news!">My News</a>'; // CI3
59+
$expected = '<a href="http://localhost/index.php/news/local/123" title="The best news!">My News</a>';
6060
$this->assertEquals($expected, $actual);
6161

6262
$actual = $this->twig->render(
@@ -67,23 +67,22 @@ public function test_anchor()
6767
'attributes' => ['<s>name</s>' => '<s>val</s>']
6868
]
6969
);
70-
// $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>'; // CI3
71-
$expected = '<a href="http://localhost/index.php/news/local/123" &lt;s&gt;name&lt;/s&gt;="&lt;s&gt;val&lt;&#x2F;s&gt;">&lt;s&gt;abc&lt;/s&gt;</a>';
70+
$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>';
7271
$this->assertEquals($expected, $actual);
7372
}
7473

7574
public function test_base_url()
7675
{
7776
$actual = $this->twig->render('base_url');
78-
// $expected = 'http://localhost/&quot;&gt;&lt;s&gt;abc&lt;/s&gt;&lt;a name=&quot;test'; // CI3
77+
// $expected = 'http://localhost/&quot;&gt;&lt;s&gt;abc&lt;/s&gt;&lt;a name=&quot;test'; // CI3
7978
$expected = 'http://localhost/%22%3E%3Cs%3Eabc%3C/s%3E%3Ca%20name=%22test';
8079
$this->assertEquals($expected, $actual);
8180
}
8281

8382
public function test_site_url()
8483
{
8584
$actual = $this->twig->render('site_url');
86-
// $expected = 'http://localhost/index.php/&quot;&gt;&lt;s&gt;abc&lt;/s&gt;&lt;a name=&quot;test'; // CI3
85+
// $expected = 'http://localhost/index.php/&quot;&gt;&lt;s&gt;abc&lt;/s&gt;&lt;a name=&quot;test'; // CI3
8786
$expected = 'http://localhost/index.php/%22%3E%3Cs%3Eabc%3C/s%3E%3Ca%20name=%22test';
8887
$this->assertEquals($expected, $actual);
8988
}

tests/CI4Twig/UrlHelperTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public function test_anchor()
4343
['title' => 'The best news!']
4444
);
4545
// $expected = '<a href="http://localhost/index.php/news/local/123" title="The best news!">My News</a>'; // CI3
46-
$expected = '<a href="http://localhost/index.php/news/local/123" title="The&#x20;best&#x20;news&#x21;">My News</a>';
46+
$expected = '<a href="http://localhost/index.php/news/local/123" title="The best news!">My News</a>';
4747
$this->assertEquals($expected, $actual);
4848

4949
$actual = anchor(
@@ -52,7 +52,7 @@ public function test_anchor()
5252
['<s>name</s>' => '<s>val</s>']
5353
);
5454
// $expected = '<a href="http://localhost/index.php/news/local/123" <s>name</s>="<s>val</s>"><s>abc</s></a>'; // CI3
55-
$expected = '<a href="http://localhost/index.php/news/local/123" <s>name</s>="&lt;s&gt;val&lt;&#x2F;s&gt;"><s>abc</s></a>';
55+
$expected = '<a href="http://localhost/index.php/news/local/123" <s>name</s>="&lt;s&gt;val&lt;/s&gt;"><s>abc</s></a>';
5656
$this->assertEquals($expected, $actual);
5757
}
5858

0 commit comments

Comments
 (0)