Skip to content
Snippets Groups Projects
Commit 28450133 authored by Vadim Justus's avatar Vadim Justus
Browse files

TDMET-5 fix integration test issues

parent 86e27aaf
Branches
Tags
1 merge request!42TDMET-5 Introduce automated testing with TD internal CI system
Pipeline #28047 failed
......@@ -7,7 +7,6 @@ use Firegento\ContentProvisioning\Api\Data\EntryInterface;
use Firegento\ContentProvisioning\Api\TargetMediaDirectoryPathProviderInterface;
use Magento\Framework\Exception\FileSystemException;
use Magento\Framework\Filesystem\DriverInterface;
use SplFileInfo;
class ApplyMediaFiles
{
......@@ -61,7 +60,7 @@ class ApplyMediaFiles
$targetPathname = $targetDirPath . DIRECTORY_SEPARATOR . $fileName;
if ($this->fileSystemDriver->isFile($sourcePathname)
&& $this->fileSystemDriver->isReadable($sourcePathname)()
&& $this->fileSystemDriver->isReadable($sourcePathname)
) {
$this->createDirectory($targetDirPath, $sourceDirPath, $sourcePathname);
$this->fileSystemDriver->copy($sourcePathname, $targetPathname);
......
......@@ -7,6 +7,9 @@ use DOMElement;
use Firegento\ContentProvisioning\Api\ConfigParserInterface;
use Magento\Framework\Exception\LocalizedException;
/**
* @api
*/
class ParserChain implements ConfigParserInterface
{
/**
......
......@@ -6,6 +6,9 @@ namespace Firegento\ContentProvisioning\Model\Config\Parser\Query;
use Firegento\ContentProvisioning\Api\MediaFilesParserInterface;
use Magento\Framework\Exception\LocalizedException;
/**
* @api
*/
class FetchMediaFilesChain implements MediaFilesParserInterface
{
/**
......
<h5>Some foobar</h5>
<p>Foobar: <a href="{{media url=&quot;image-1.png&quot;}}">Link zu einem Bilder</a></p>
<p>Foobar: <a href="{{media url=image-1.png}}">Link zu einem Bilder</a></p>
<p>Dummy content...</p>
<p>Image:&nbsp;<img src="{{media url=&quot;some-test-image.png&quot;}}" alt="fooo" width="300"></p>
<p>Image 2:&nbsp;<img src="{{media url=&quot;foobar/test.png&quot;}}" alt="" width="450" height="150"></p>
\ No newline at end of file
<p>Image:&nbsp;<img src="{{media url=some-test-image.png}}" alt="fooo" width="300"></p>
<p>Image 2:&nbsp;<img src="{{media url=foobar/test.png}}" alt="" width="450" height="150"></p>
\ No newline at end of file
......@@ -81,13 +81,7 @@ class InstallMediaFilesTest extends TestCase
*/
private function getChildDirectoryUrl(string $name): string
{
foreach ($this->fileSystem->getChildren() as $child) {
if ($child->getName() === $name) {
return $child->url();
}
}
$this->fail('Unknown child name for virtual directory!');
return $this->fileSystem->getChild($name)->url();
}
protected function initEntries()
......
<h5>Some foobar</h5>
<p>Foobar: <a href="{{media url=&quot;image-1.png&quot;}}">Link zu einem Bilder</a></p>
<p>Foobar: <a href="{{media url=image-1.png}}">Link zu einem Bilder</a></p>
<p>Dummy content...</p>
<p>Image:&nbsp;<img src="{{media url=&quot;some-test-image.png&quot;}}" alt="fooo" width="300"></p>
<p>Image 2:&nbsp;<img src="{{media url=&quot;foobar/test.png&quot;}}" alt="" width="450" height="150"></p>
\ No newline at end of file
<p>Image:&nbsp;<img src="{{media url=some-test-image.png}}" alt="fooo" width="300"></p>
<p>Image 2:&nbsp;<img src="{{media url=foobar/test.png}}" alt="" width="450" height="150"></p>
\ No newline at end of file
......@@ -42,7 +42,7 @@
<!-- Semicolon-separated 'glob' patterns, that match global XML configuration files -->
<const name="TESTS_GLOBAL_CONFIG_DIR" value="../../../app/etc"/>
<!-- Whether to cleanup the application before running tests or not -->
<const name="TESTS_CLEANUP" value="enabled"/>
<const name="TESTS_CLEANUP" value="disabled"/>
<!-- Memory usage and estimated leaks thresholds -->
<!--<const name="TESTS_MEM_USAGE_LIMIT" value="1024M"/>-->
<const name="TESTS_MEM_LEAK_LIMIT" value=""/>
......
......@@ -105,6 +105,17 @@
</arguments>
</type>
<type name="Firegento\ContentProvisioning\Model\Resolver\FileContentResolver">
<arguments>
<argument name="fileSystemDriver" xsi:type="object">Magento\Framework\Filesystem\Driver\File</argument>
</arguments>
</type>
<type name="Firegento\ContentProvisioning\Model\Command\ApplyMediaFiles">
<arguments>
<argument name="fileSystemDriver" xsi:type="object">Magento\Framework\Filesystem\Driver\File</argument>
</arguments>
</type>
<type name="Firegento\ContentProvisioning\Model\Resolver\ContentResolverProvider">
<arguments>
<argument name="contentResolvers" xsi:type="array">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment