mirror of
https://github.com/e107inc/e107.git
synced 2025-08-18 04:12:00 +02:00
This commit is contained in:
@@ -79,12 +79,35 @@
|
||||
$this->assertSame($expected, $result);
|
||||
|
||||
}
|
||||
/*
|
||||
|
||||
public function testImgToBBcode()
|
||||
{
|
||||
|
||||
}
|
||||
$tests = [
|
||||
0 => [
|
||||
'html' => '<p><img class="img-rounded rounded bbcode bbcode-img" src="/e107v2/thumb.php?src=e_MEDIA_IMAGE%2F2021-10%2Ftest.jpg&w=0&h=0" alt="test" title="test"></p>',
|
||||
'expected' =>'<p>[img title=test]{e_MEDIA_IMAGE}2021-10/test.jpg[/img]</p>'
|
||||
],
|
||||
|
||||
/* 1 => [
|
||||
'html' => '<p><img class="img-rounded rounded bbcode bbcode-img" src="/e107v2/thumb.php?src=e_MEDIA_IMAGE%2F2021-10%2Ftest.jpg&w=0&h=0" alt="test" title="test"></p>',
|
||||
'expected' =>'<p>[img title=test]{e_MEDIA_IMAGE}2021-10/test.jpg[/img]</p>'
|
||||
],*/
|
||||
|
||||
|
||||
|
||||
];
|
||||
|
||||
|
||||
foreach($tests as $count => $t)
|
||||
{
|
||||
$actual = $this->bb->imgToBBcode($t['html']);
|
||||
$this->assertSame($t['expected'], $actual, 'Test '.$count.' failed');
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
/*
|
||||
public function testResizeHeight()
|
||||
{
|
||||
|
||||
|
@@ -120,8 +120,15 @@ Plain text paragraph 3<br />';
|
||||
$this->assertEquals($expected_2, $actual_2);
|
||||
|
||||
|
||||
$test_3 = "<p>Nikdy nehovor, že niečo nejde, pretože sa vždy nájde blbec, čo to urobí.</p>";
|
||||
$actual_3 = $this->tm->toDB($test_3);
|
||||
$expected_3 = "[html]<p>Nikdy nehovor, že niečo nejde, pretože sa vždy nájde blbec, čo to urobí.</p>[/html]";
|
||||
$this->assertEquals($expected_3, $actual_3);
|
||||
|
||||
|
||||
$result3 = $this->tm->toHTML($actual_3);
|
||||
$this->assertEquals($test_3, $result3);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -213,14 +220,14 @@ Plain text paragraph 3<br />';
|
||||
{ORDER_DATA: cust_firstname} {ORDER_DATA: cust_lastname}<br />
|
||||
{ORDER_DATA: cust_company}<br />
|
||||
{ORDER_DATA: cust_address}<br />
|
||||
{ORDER_DATA: cust_city} {ORDER_DATA: cust_state} {ORDER_DATA: cust_zip}<br />
|
||||
{ORDER_DATA: cust_city} {ORDER_DATA: cust_state} {ORDER_DATA: cust_zip}<br />
|
||||
{ORDER_DATA: cust_country}
|
||||
<br />
|
||||
<h4>Shipping address</h4>
|
||||
{ORDER_DATA: ship_firstname} {ORDER_DATA: ship_lastname}<br />
|
||||
{ORDER_DATA: ship_company}<br />
|
||||
{ORDER_DATA: ship_address}<br />
|
||||
{ORDER_DATA: ship_city} {ORDER_DATA: ship_state} {ORDER_DATA: ship_zip}<br />
|
||||
{ORDER_DATA: ship_city} {ORDER_DATA: ship_state} {ORDER_DATA: ship_zip}<br />
|
||||
{ORDER_DATA: ship_country}
|
||||
</td>
|
||||
</tr>
|
||||
|
Reference in New Issue
Block a user