- Timestamp:
- 08/08/2024 11:28:30 AM (6 months ago)
- Location:
- branches/6.6
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/6.6
-
branches/6.6/tests/phpunit/tests/interactivity-api/wpInteractivityAPI.php
r58327 r58869 1400 1400 } 1401 1401 1402 1403 1402 /** 1404 1403 * Tests the `evaluate` method for derived state functions that throw. … … 1423 1422 $result = $this->evaluate( 'state.derivedThatThrows' ); 1424 1423 $this->assertNull( $result ); 1424 } 1425 1426 /** 1427 * Tests the `evaluate` method for derived state intermediate values. 1428 * 1429 * @ticket 61741 1430 * 1431 * @covers ::evaluate 1432 */ 1433 public function test_evaluate_derived_state_intermediate() { 1434 $this->interactivity->state( 1435 'myPlugin', 1436 array( 1437 'derivedState' => function () { 1438 return array( 'property' => 'value' ); 1439 }, 1440 ) 1441 ); 1442 $this->set_internal_context_stack(); 1443 $this->set_internal_namespace_stack( 'myPlugin' ); 1444 1445 $result = $this->evaluate( 'state.derivedState.property' ); 1446 $this->assertSame( 'value', $result ); 1425 1447 } 1426 1448
Note: See TracChangeset
for help on using the changeset viewer.