Skip to content

Commit 0ab45e8

Browse files
committed
- update repeater test
1 parent b2c2fe5 commit 0ab45e8

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

tests/wpunit/FieldTypes/RepeaterFieldTest.php

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,20 @@ public function get_block_query_fragment() {
9999
';
100100
}
101101

102+
// Skip the test for older versions of ACF 🤷‍♂️
103+
public function testQueryFieldOnPostReturnsExpectedValue() {
104+
if ( ! defined( 'ACF_VERSION' ) || version_compare( ACF_VERSION, '6.1', '<' ) ) {
105+
$this->markTestSkipped( 'Skipping test for old versions of WPGraphQL' );
106+
}
107+
108+
parent::testQueryFieldOnPostReturnsExpectedValue();
109+
}
110+
102111
public function get_block_data_to_store() {
103-
return 1;
112+
return [
113+
'test_repeater_0_nested_text' => 'nested text field value...',
114+
'_test_repeater_0_nested_text' => 'field_nested_text'
115+
];
104116
}
105117

106118
public function get_extra_block_data_to_store( $acf_field_key = '', $acf_field_name = '' ): array {

0 commit comments

Comments
 (0)