diff --git a/tests/phpunit/tests/basic.php b/tests/phpunit/tests/basic.php index dfea75d64c..06cf909c0c 100644 --- a/tests/phpunit/tests/basic.php +++ b/tests/phpunit/tests/basic.php @@ -159,4 +159,22 @@ EOF; $this->assertFalse( isset( $basic->foo ) ); } + + function test_switch_order() { + $return = $this->_switch_order_helper( 1 ); + $this->assertEquals( 'match', $return ); + } + + function _switch_order_helper( $var ) { + $return = 'no match'; + switch ( $var ) { + default: + break; + case 1: + $return = 'match'; + break; + } + + return $return; + } }