Is assertEmpty( x ) supposed to behave like assertTrue( empty( x ) )?
The following code will complain that element with index "nonexisting" does not exist:
$a = array();
$this->assertEmpty( $a["nonexisting"] );
I wonder is it expected behavior, because it is not what empty() will do. Somehow logical would be that assertEmpty(x) is equivalent to assertTrue(empty(x)), at least in my opinion.
Thanks for the bug report, @isokissa. It's called assertEmpty() because the implementation uses empty() (see here). There's not really much we can do about the notice since it's generated outside of PHPUnit's code. You might want to try assertArrayHasKey().
I see, it is a PHP feature, a bit not nice one.
Maybe this detail can be mentioned in the documentation for assertEmpty(), when committing next time ;)