Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
jygaulier committed Sep 25, 2023
1 parent f3796cc commit 0263c91
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions tests/classes/databox/subdefTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -258,17 +258,12 @@ public function testSubstituableStatus($expected, $configValue, $message)
{
$xmlTemplate = <<<'EOF'
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<subdef class="thumbnail" name="gifou" downloadable="false">
<subdef class="thumbnail" name="gifou" downloadable="false" %s>
<path>/home/datas/noweb/db_alch_phrasea/video/</path>
<mediatype>image</mediatype>
%s
</subdef>
EOF;

if (null !== $configValue) {
$configValue = ' orderable="' . $configValue . '"';
}

$xml = sprintf($xmlTemplate, $configValue ?: '');

$sut = new databox_subdef(new Type\Image(), simplexml_load_string($xml), $this->translator);
Expand All @@ -280,9 +275,8 @@ public function providesSubstituableStatuses()
{
return [
[false, '', 'No substituable Status set should defaults to true'],
[false, '<substituable></substituable>', 'substituable should default to false'],
[true, '<substituable>yes</substituable>', 'substituable should be true'],
[false, '<substituable>no</substituable>', 'substituable should be false'],
[false, 'substituable="false"', 'substituable should default to false'],
[true, 'substituable="true"', 'substituable should be true'],
];
}

Expand Down

0 comments on commit 0263c91

Please sign in to comment.