- Timestamp:
- 07/29/2024 11:08:18 AM (6 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/interactivity-api/wpInteractivityAPI.php
r58729 r58825 1298 1298 } 1299 1299 1300 1301 1300 /** 1302 1301 * Tests the `evaluate` method for derived state functions that throw. … … 1321 1320 $result = $this->evaluate( 'state.derivedThatThrows' ); 1322 1321 $this->assertNull( $result ); 1322 } 1323 1324 /** 1325 * Tests the `evaluate` method for derived state intermediate values. 1326 * 1327 * @ticket 61741 1328 * 1329 * @covers ::evaluate 1330 */ 1331 public function test_evaluate_derived_state_intermediate() { 1332 $this->interactivity->state( 1333 'myPlugin', 1334 array( 1335 'derivedState' => function () { 1336 return array( 'property' => 'value' ); 1337 }, 1338 ) 1339 ); 1340 $this->set_internal_context_stack(); 1341 $this->set_internal_namespace_stack( 'myPlugin' ); 1342 1343 $result = $this->evaluate( 'state.derivedState.property' ); 1344 $this->assertSame( 'value', $result ); 1323 1345 } 1324 1346
Note: See TracChangeset
for help on using the changeset viewer.