Skip to content

Commit

Permalink
improved test logic to ensure proper constant handling
Browse files Browse the repository at this point in the history
  • Loading branch information
shreya0204 committed Jun 20, 2024
1 parent 848adda commit 1df20c2
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions tests/AddRemoveTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -157,13 +157,8 @@ public function testRemoveConstantWithConcatenation() {
$this->assertTrue( self::$config_transformer->remove( 'constant', $name ), "Removing constant {$name}" );
$this->assertFalse( self::$config_transformer->exists( 'constant', $name ), "Check {$name} does not exist" );

// Ensure the second constant is still present and unchanged
// Ensure the second constant is still present after the removal
$this->assertTrue( self::$config_transformer->exists( 'constant', $second_name ), "Check {$second_name} still exists" );

// Load the wp-config to check if only the intended constant was removed
require self::$test_config_path;
$this->assertFalse( defined( $name ), "{$name} should not be defined" );
$this->assertTrue( defined( $second_name ), "{$second_name} should still be defined" );
}

public function testAddConstantNoPlacementAnchor() {
Expand Down

0 comments on commit 1df20c2

Please sign in to comment.