@since tag must be included when you add a new, full test (not necessary for test stubs that are marked as incomplete).
/**
* Tests the JClass::__construct method
*
* @return void
*
* @since 11.3
*/
public function test__construct()
{
$object = new JMyClass('foo');
// For the purposes of this example, we are assuming that 'name' is a protected class property
// that is set by an argument passed into the class constructor.
$this->assertThat(
ReflectionHelper::getValue($object, 'name'),
$this->equalTo('foo'),
'Tests that the protected name property is set by the constructor.'
);
} /**
* Test that calls a protected method called 'hidden'
*
* @return void
*
* @since 11.3
*/
public function hidden()
{
$object = new JMyClass('foo');
$this->assertThat(
ReflectionHelper::invoke($object, 'hidden', 'arg1'),
$this->equalTo('result1'),
'This test asserts that $object->hidden("arg1") will return "result1"'
);
}