Skip to content
This repository was archived by the owner on Nov 21, 2019. It is now read-only.

Commit 621643b

Browse files
nlisgothewilkybarkid
authored andcommitted
italic should match libero schema (#38)
1 parent d111720 commit 621643b

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

vendor-extra/LiberoContentBundle/src/ViewConverter/ItalicVisitor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ protected function possibleTemplate() : string
3535

3636
protected function expectedElement() : string
3737
{
38-
return '{http://libero.pub}i';
38+
return '{http://libero.pub}italic';
3939
}
4040

4141
protected function unexpectedArguments() : array

vendor-extra/LiberoContentBundle/tests/ViewConverter/ItalicVisitorTest.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ public function it_does_nothing_if_it_is_not_a_libero_italic_element(string $xml
3737

3838
public function nodeProvider() : iterable
3939
{
40-
yield 'different namespace' => ['<i xmlns="http://example.com">foo</i>'];
41-
yield 'different element' => ['<b xmlns="http://libero.pub">foo</b>'];
40+
yield 'different namespace' => ['<italic xmlns="http://example.com">foo</italic>'];
41+
yield 'different element' => ['<bold xmlns="http://libero.pub">foo</bold>'];
4242
}
4343

4444
/**
@@ -67,7 +67,7 @@ public function it_does_nothing_if_there_is_already_text_set() : void
6767
{
6868
$visitor = new ItalicVisitor($this->createFailingConverter());
6969

70-
$xml = FluentDOM::load('<i xmlns="http://libero.pub">foo</i>');
70+
$xml = FluentDOM::load('<italic xmlns="http://libero.pub">foo</italic>');
7171
/** @var Element $element */
7272
$element = $xml->documentElement;
7373

@@ -88,9 +88,9 @@ public function it_sets_the_template_and_text_argument() : void
8888

8989
$xml = FluentDOM::load(
9090
<<<XML
91-
<libero:i xmlns:libero="http://libero.pub">
92-
foo <libero:b>bar</libero:b> baz
93-
</libero:i>
91+
<libero:italic xmlns:libero="http://libero.pub">
92+
foo <libero:bold>bar</libero:bold> baz
93+
</libero:italic>
9494
XML
9595
);
9696
/** @var Element $element */
@@ -105,15 +105,15 @@ public function it_sets_the_template_and_text_argument() : void
105105
'text' => [
106106
new View(
107107
null,
108-
['node' => '/libero:i/text()[1]', 'template' => null, 'context' => ['qux' => 'quux']]
108+
['node' => '/libero:italic/text()[1]', 'template' => null, 'context' => ['qux' => 'quux']]
109109
),
110110
new View(
111111
null,
112-
['node' => '/libero:i/libero:b', 'template' => null, 'context' => ['qux' => 'quux']]
112+
['node' => '/libero:italic/libero:bold', 'template' => null, 'context' => ['qux' => 'quux']]
113113
),
114114
new View(
115115
null,
116-
['node' => '/libero:i/text()[2]', 'template' => null, 'context' => ['qux' => 'quux']]
116+
['node' => '/libero:italic/text()[2]', 'template' => null, 'context' => ['qux' => 'quux']]
117117
),
118118
],
119119
],

vendor-extra/LiberoContentBundle/tests/ViewConverter/TitleHeadingVisitorTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public function it_sets_the_text_argument() : void
9393
$xml = FluentDOM::load(
9494
<<<XML
9595
<libero:title xmlns:libero="http://libero.pub">
96-
foo <libero:i>bar</libero:i> baz
96+
foo <libero:italic>bar</libero:italic> baz
9797
</libero:title>
9898
XML
9999
);
@@ -113,7 +113,7 @@ public function it_sets_the_text_argument() : void
113113
),
114114
new View(
115115
null,
116-
['node' => '/libero:title/libero:i', 'template' => null, 'context' => ['qux' => 'quux']]
116+
['node' => '/libero:title/libero:italic', 'template' => null, 'context' => ['qux' => 'quux']]
117117
),
118118
new View(
119119
null,

0 commit comments

Comments
 (0)