Skip to content

Commit 33e6955

Browse files
authored
8.1.3 (#13)
Co-authored-by: [email protected] <CircleCI>
1 parent 2b0efaf commit 33e6955

File tree

7 files changed

+55
-40
lines changed

7 files changed

+55
-40
lines changed

.circleci/config.yml

Lines changed: 33 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -5,76 +5,85 @@ version: 2
55
defaults: &defaults
66
docker:
77
- image: pookmish/drupal8ci:pcov
8-
- image: selenium/standalone-chrome:3.141.59-neon
8+
- image: selenium/standalone-chrome:latest
99
- image: mariadb:10.3
1010
environment:
1111
MYSQL_ALLOW_EMPTY_PASSWORD: 1
1212
working_directory: /var/www/html
1313

14-
1514
#Jobs
1615
code_coverage: &code_coverage
1716
<<: *defaults
1817
steps:
1918
- restore_cache:
2019
keys:
21-
- dependencies-
20+
- dependencies-v1
2221
- checkout:
2322
path: /var/www/test
2423
- run:
2524
name: Run PHP Unit Coverage Tests
2625
command: |
27-
composer global require SU-SWS/stanford-caravan:dev-8.x-1.x
26+
composer global require SU-SWS/stanford-caravan:dev-8.x-2.x
2827
~/.composer/vendor/bin/sws-caravan phpunit /var/www/html --extension-dir=/var/www/test --with-coverage
2928
- save_cache:
30-
key: dependencies-{{ epoch }}
29+
key: dependencies-v1-{{ epoch }}
3130
paths:
3231
- .
3332
- store_test_results:
3433
path: /var/www/html/artifacts/phpunit
3534
- store_artifacts:
3635
path: /var/www/html/artifacts/phpunit/coverage
3736

38-
behat: &behat
37+
back_to_dev: &back_to_dev
38+
<<: *defaults
39+
steps:
40+
- checkout
41+
- run:
42+
name: Back to dev
43+
command: |
44+
composer global require SU-SWS/stanford-caravan:dev-8.x-2.x
45+
~/.composer/vendor/bin/sws-caravan back-to-dev ${CIRCLE_TAG} ${CIRCLE_WORKING_DIRECTORY}
46+
47+
d8_codeception: &d8_codeception
3948
<<: *defaults
4049
steps:
41-
- restore_cache:
42-
keys:
43-
- dependencies-
4450
- checkout:
4551
path: /var/www/test
4652
- run:
47-
name: Run Behat Tests
53+
name: Run Codeception Tests
4854
command: |
4955
composer global require SU-SWS/stanford-caravan:dev-8.x-1.x
50-
~/.composer/vendor/bin/sws-caravan behat /var/www/html --extension-dir=/var/www/test
51-
- save_cache:
52-
key: dependencies-{{ epoch }}
53-
paths:
54-
- .
56+
~/.composer/vendor/bin/sws-caravan codeception /var/www/html --extension-dir=/var/www/test
5557
- store_test_results:
5658
path: /var/www/html/artifacts/behat
5759
- store_artifacts:
5860
path: /var/www/html/artifacts
5961

60-
back_to_dev: &back_to_dev
62+
d9_codeception: &d9_codeception
6163
<<: *defaults
6264
steps:
63-
- checkout
65+
- checkout:
66+
path: /var/www/test
6467
- run:
65-
name: Back to dev
68+
name: Run Codeception Tests
6669
command: |
67-
composer global require SU-SWS/stanford-caravan:dev-8.x-1.x
68-
~/.composer/vendor/bin/sws-caravan back-to-dev ${CIRCLE_TAG} ${CIRCLE_WORKING_DIRECTORY}
70+
composer global require SU-SWS/stanford-caravan:dev-8.x-2.x
71+
~/.composer/vendor/bin/sws-caravan codeception /var/www/html --extension-dir=/var/www/test
72+
- store_test_results:
73+
path: /var/www/html/artifacts/behat
74+
- store_artifacts:
75+
path: /var/www/html/artifacts
6976

7077
# Declare all of the jobs we should run.
7178
jobs:
7279
run-coverage:
7380
<<: *code_coverage
74-
run-behat:
75-
<<: *behat
7681
run-back-to-dev:
7782
<<: *back_to_dev
83+
run-d8-codeception:
84+
<<: *d8_codeception
85+
run-d9-codeception:
86+
<<: *d9_codeception
7887

7988
# Declare a workflow that runs all of our jobs in parallel.
8089
workflows:
@@ -92,12 +101,12 @@ workflows:
92101
tests:
93102
jobs:
94103
- run-coverage
95-
- run-behat
104+
- run-d8-codeception
105+
- run-d9-codeception
96106
# Re-test every sunday in case this code becomes stale.
97107
sundays:
98108
jobs:
99109
- run-coverage
100-
- run-behat
101110
triggers:
102111
- schedule:
103112
cron: "0 0 * * 0"

CHANGELOG.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Stanford Fields
22

3+
8.1.3
4+
--------------------------------------------------------------------------------
5+
_Release Date: 2021-01-13_
6+
7+
* Updated phpunit tests to pass in the new year.
8+
39
8.1.2
410
--------------------------------------------------------------------------------
511
_Release Date: 2020-04-16_
@@ -13,14 +19,14 @@ _Release Date: 2020-04-16_
1319
* Update stanford_fields.info.yml (14cad23)
1420

1521
8.x-1.1
16-
--------------------------------------------------------------------------------
22+
--------------------------------------------------------------------------------
1723
_Release Date: 2019-11-19_
1824

1925
- Add form validation to field UI form to prevent the user from entering a field
20-
name that will generate a hashed table name.
26+
name that will generate a hashed table name.
2127

2228
8.x-1.0
23-
--------------------------------------------------------------------------------
29+
--------------------------------------------------------------------------------
2430
_Release Date: 2019-10-30_
2531

2632
- Initial Release

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"type": "drupal-custom-module",
55
"homepage": "https://github.com/SU-SWS/stanford_fields",
66
"authors": [],
7-
"license": "GPL-2.0+",
7+
"license": "GPL-2.0-or-later",
88
"minimum-stability": "dev",
99
"repositories": [
1010
{

stanford_fields.info.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ type: module
33
description: 'Field types, widgets and formatters to enhance Drupal and Contrib.'
44
core_version_requirement: ^8 || ^9
55
package: Stanford
6-
version: 8.x-1.2
6+
version: 8.x-1.3
77
dependencies:
88
- drupal:field

tests/src/Kernel/Plugin/Field/FieldWidget/DateYearOnlyWidgetTest.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class DateYearOnlyWidgetTest extends KernelTestBase {
3636
/**
3737
* {@inheritDoc}
3838
*/
39-
protected function setUp() {
39+
protected function setUp(): void {
4040
parent::setUp();
4141
$this->installEntitySchema('user');
4242
$this->installEntitySchema('node');
@@ -88,14 +88,16 @@ public function testWidgetForm() {
8888
$ten_years = 60 * 60 * 24 * 365 * 10;
8989
$range = date('Y', time() - $ten_years) . ':' . date('Y', time() + $ten_years);
9090

91-
$this->assertEqual('datelist', $widget_value['#type']);
92-
$this->assertEqual($range, $widget_value['#date_year_range']);
91+
$this->assertEquals('datelist', $widget_value['#type']);
92+
$this->assertEquals($range, $widget_value['#date_year_range']);
9393
}
9494

9595
/**
9696
* Test the settings form and the summary.
9797
*/
9898
public function testSettingsForm() {
99+
$ten_years = 60 * 60 * 24 * 365 * 10;
100+
99101
$field_def = $this->createMock(FieldDefinitionInterface::class);
100102
$config = [
101103
'field_definition' => $field_def,
@@ -104,17 +106,15 @@ public function testSettingsForm() {
104106
];
105107
$definition = [];
106108
$widget = DateYearOnlyWidget::create(\Drupal::getContainer(), $config, '', $definition);
107-
$summary = 'Years 2010 to 2030';
108-
$this->assertEqual($summary, $widget->settingsSummary()[0]);
109+
$summary = sprintf('Years %s to %s', date('Y', time() - $ten_years), date('Y', time() + $ten_years));
110+
$this->assertEquals($summary, $widget->settingsSummary()[0]);
109111

110112
$form = [];
111113
$form_state = new FormState();
112114
$element = $widget->settingsForm($form, $form_state);
113115

114-
$ten_years = 60 * 60 * 24 * 365 * 10;
115-
116-
$this->assertEqual(date('Y', time() - $ten_years), $element['start']['#default_value']);
117-
$this->assertEqual(date('Y', time() + $ten_years), $element['end']['#default_value']);
116+
$this->assertEquals(date('Y', time() - $ten_years), $element['start']['#default_value']);
117+
$this->assertEquals(date('Y', time() + $ten_years), $element['end']['#default_value']);
118118
}
119119

120120
}

tests/src/Unit/Plugin/Field/FieldFormatter/EntityTitleHeadingTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class EntityTitleHeadingTest extends FieldFormatterTestBase {
3535
/**
3636
* {@inheritDoc}
3737
*/
38-
protected function setUp() {
38+
protected function setUp(): void {
3939
parent::setUp();
4040
$field_definition = $this->createMock(FieldDefinitionInterface::class);
4141

tests/src/Unit/Plugin/Field/FieldFormatter/FieldFormatterTestBase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ abstract class FieldFormatterTestBase extends UnitTestCase {
1818
/**
1919
* {@inheritDoc}
2020
*/
21-
protected function setUp() {
21+
protected function setUp(): void {
2222
parent::setUp();
2323
$path_matcher = $this->createMock(PathMatcherInterface::class);
2424
$path_matcher->method('isFrontPage')

0 commit comments

Comments
 (0)