Skip to content

Commit

Permalink
Update unit tests for d10
Browse files Browse the repository at this point in the history
  • Loading branch information
pookmish committed Sep 8, 2023
1 parent 25d2354 commit 947bc41
Show file tree
Hide file tree
Showing 11 changed files with 13 additions and 22 deletions.
11 changes: 1 addition & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
uses: K-Phoen/semver-release-action@master
with:
release_strategy: none
release_branch: main
release_branch: 8.x
tag_format: "%major%.%minor%.%patch%"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -32,12 +32,3 @@ jobs:
commit: ${{ github.sha }}
generateReleaseNotes: true
makeLatest: true
- uses: actions/checkout@v3
with:
ref: '9.x'
fetch-depth: 0
- name: Back to Dev
if: ${{ steps.tag.outputs.tag }}
run: |
composer global require su-sws/stanford-caravan:dev-8.x-3.x
~/.composer/vendor/bin/sws-caravan back-to-dev ${{ steps.tag.outputs.tag }} ${{ github.workspace }} main
6 changes: 3 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
env:
CC_TEST_REPORTER_ID: ${{secrets.CC_TEST_REPORTER_ID}}
run: |
composer global require su-sws/stanford-caravan:dev-8.x-2.x
composer global require su-sws/stanford-caravan:10.x-dev
~/.composer/vendor/bin/sws-caravan phpunit /var/www/html --extension-dir=$GITHUB_WORKSPACE/project --with-coverage
- name: Save Test Results
uses: actions/upload-artifact@v3
Expand Down Expand Up @@ -61,7 +61,7 @@ jobs:
# path: project
# - name: Run tests
# run: |
# composer global require su-sws/stanford-caravan:dev-8.x-2.x
# composer global require su-sws/stanford-caravan:10.x-dev
# ~/.composer/vendor/bin/sws-caravan codeception /var/www/html --extension-dir=$GITHUB_WORKSPACE/project --suites=acceptance
# - name: Save Test Results
# uses: actions/upload-artifact@v3
Expand Down Expand Up @@ -100,7 +100,7 @@ jobs:
# path: project
# - name: Run tests
# run: |
# composer global require su-sws/stanford-caravan:dev-8.x-2.x
# composer global require su-sws/stanford-caravan:10.x-dev
# ~/.composer/vendor/bin/sws-caravan codeception /var/www/html --extension-dir=$GITHUB_WORKSPACE/project --suites=functional
# - name: Save Test Results
# uses: actions/upload-artifact@v3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class StanfordFieldBookAdminEditFormTest extends StanfordFieldKernelTestBase {
/**
* {@inheritDoc}
*/
protected function setUp(): void {
public function setup(): void {
parent::setUp();
\Drupal::service('module_installer')->install(['book']);

Expand Down
2 changes: 1 addition & 1 deletion tests/src/Kernel/Plugin/Block/BookForwardBackBlockTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class BookForwardBackBlockTest extends StanfordFieldKernelTestBase {
/**
* {@inheritDoc}
*/
protected function setUp(): void {
public function setup(): void {
parent::setUp();
\Drupal::service('module_installer')->install(['book']);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class DateYearOnlyWidgetTest extends StanfordFieldKernelTestBase {
/**
* {@inheritDoc}
*/
protected function setUp(): void {
public function setup(): void {
parent::setUp();
$field_storage = FieldStorageConfig::create([
'field_name' => 'field_date',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class LocalistUrlWidgetTest extends StanfordFieldKernelTestBase {
/**
* {@inheritDoc}
*/
protected function setUp(): void {
public function setup(): void {
parent::setUp();

$field_storage = FieldStorageConfig::create([
Expand Down
2 changes: 1 addition & 1 deletion tests/src/Kernel/Service/FieldCacheTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class FieldCacheTest extends StanfordFieldKernelTestBase {
/**
* {@inheritDoc}
*/
protected function setUp(): void {
public function setup(): void {
parent::setUp();

// Create a comment field attached to a host 'entity_test' entity.
Expand Down
2 changes: 1 addition & 1 deletion tests/src/Kernel/Service/StanfordFieldBookManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class StanfordFieldBookManagerTest extends StanfordFieldKernelTestBase {
/**
* {@inheritDoc}
*/
protected function setUp(): void {
public function setup(): void {
parent::setUp();
\Drupal::service('module_installer')->install(['book']);

Expand Down
2 changes: 1 addition & 1 deletion tests/src/Kernel/StanfordFieldKernelTestBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class StanfordFieldKernelTestBase extends KernelTestBase {
/**
* {@inheritDoc}
*/
protected function setUp(): void {
public function setup(): void {
parent::setUp();
$this->installEntitySchema('user');
$this->installEntitySchema('node');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class EntityTitleHeadingTest extends FieldFormatterTestBase {
/**
* {@inheritDoc}
*/
protected function setUp(): void {
public function setup(): void {
parent::setUp();
$field_definition = $this->createMock(FieldDefinitionInterface::class);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ abstract class FieldFormatterTestBase extends UnitTestCase {
/**
* {@inheritDoc}
*/
protected function setUp(): void {
public function setup(): void {
parent::setUp();
$path_matcher = $this->createMock(PathMatcherInterface::class);
$path_matcher->method('isFrontPage')
Expand Down

0 comments on commit 947bc41

Please sign in to comment.