Skip to content

Commit

Permalink
Require rte-ckeditor-image in dev for it to be available in the funct…
Browse files Browse the repository at this point in the history
…ional test. Issue #4
  • Loading branch information
Mathis Koblin committed Nov 15, 2024
1 parent 3e3766d commit b46174d
Show file tree
Hide file tree
Showing 8 changed files with 7 additions and 42 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,13 @@ jobs:
matrix:
php: [ '8.2', '8.3', '8.4' ]
minMax: [ 'composerInstall']
extra: [ 'composer -- require netresearch/rte-ckeditor-image']
steps:
- name: "Checkout"
uses: actions/checkout@v4

- name: "Composer"
run: Build/Scripts/runTests.sh -p ${{ matrix.php }} -s ${{ matrix.minMax }}

- name: "Composer Extra"
run: Build/Scripts/runTests.sh -p ${{ matrix.php }} -s ${{ matrix.extra }}

- name: "Functional tests with mariadb"
if: always()
run: Build/Scripts/runTests.sh -p ${{ matrix.php }} -d mariadb -s functional
Expand Down
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,3 @@ Otherwise only description is checked.
composer install
./Build/Scripts/runTests.sh -s functional -d mariadb -p 8.3
```
> **Note**
> To test the update of the rte-ckeditor-image soft references,
> you need to install the extension before running the test:
> `composer req netresearch/rte-ckeditor-image`. Remove it afterwards again.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
"sys_refindex",,,,,,,
,"hash","tablename","recuid","field","softref_key","ref_table","ref_uid"
,"507cf53279411321324cd2f424e0681e","tt_content","1","bodytext","typolink_tag","sys_file","1"
,"507cf53279411321324cd2f424e0681b","tt_content","2","bodytext","typolink_tag","sys_file","1"
"tt_content",
,"uid","bodytext"
,1,'<a href="t3://file?uid=1">link</a>'
,2,'<img data-htmlarea-file-uid="1">'
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
"sys_refindex",,,,,,,
,"hash","tablename","recuid","field","softref_key","ref_table","ref_uid"
,"507cf53279411321324cd2f424e0681e","tt_content","1","bodytext","typolink_tag","sys_file","2"
,"507cf53279411321324cd2f424e0681b","tt_content","2","bodytext","typolink_tag","sys_file","2"
"tt_content",
,"uid","bodytext"
,1,'<a href="t3://file?uid=2">link</a>'
,2,'<img data-htmlarea-file-uid="2">'
13 changes: 2 additions & 11 deletions Tests/Functional/Command/UnduplicateCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

use PHPUnit\Framework\Attributes\Test;
use RuntimeException;
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
use TYPO3\TestingFramework\Core\Functional\FunctionalTestCase;

class UnduplicateCommandTest extends FunctionalTestCase
Expand Down Expand Up @@ -53,20 +52,12 @@ class UnduplicateCommandTest extends FunctionalTestCase

#[Test] public function unduplicateCommandFixesDuplicatesWithReferences(): void
{
if (ExtensionManagementUtility::isLoaded('rte_ckeditor_image')) {
$this->importCSVDataSet(__DIR__ . '/DataSet/sys_file_duplicates_with_ref_and_rte-ckeditor-image.csv');
} else {
$this->importCSVDataSet(__DIR__ . '/DataSet/sys_file_duplicates_with_references.csv');
}
$this->importCSVDataSet(__DIR__ . '/DataSet/sys_file_duplicates_with_references.csv');

$result = $this->executeConsoleCommand(self::BASE_COMMAND);

// the references are updated, so that the newer sys_file entry (uid=2) is used
if (ExtensionManagementUtility::isLoaded('rte_ckeditor_image')) {
$this->importCSVDataSet(__DIR__ . '/DataSet/sys_file_duplicates_with_ref_and_rte-ckeditor-image_RESULT.csv');
} else {
$this->assertCSVDataSet(__DIR__ . '/DataSet/sys_file_duplicates_with_references_RESULT.csv');
}
$this->assertCSVDataSet(__DIR__ . '/DataSet/sys_file_duplicates_with_references_RESULT.csv');
self::assertEquals(0, $result['status']);
}

Expand Down
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
}
},
"require-dev": {
"netresearch/rte-ckeditor-image": "^12.0",
"phpunit/phpunit": "^11",
"typo3/testing-framework": "8.2.0"
}
Expand Down

0 comments on commit b46174d

Please sign in to comment.