you could also mock a method and a data provider, and make sure it never is called. without making any assertions, because it is not called, it means it has passed the test.
<?php
/**
* @dataProvider dataProvider
*/
public function checkSomethingIsDisabled( $message, $config, $expected)
{
$debugMock = $this->getMockBuilder('APP_Class_Name')
->disableOriginalConstructor()
->setMethods(array('_helper'))
->getMock();
$debugMock = $this->getPublicClass($debugMock);
$debugMock->_config = $config;
$viewContent = new stdClass;
$debugMock->_functionToTest($viewContent);
}
public function dataProvider()
{
return [
'dataset'=>
[
'message' => 'Debug Disabled',
'config' => (object) array(
'values' => (object) array(
'valueThatWhenFalseDoesntExecuteFunc'=> false
)
),
// in a probably needed complimentary "imaginary" test we probably
// will have the valueThatWhenFalseDoesntExecuteFunc set to true and on
// expected more information to handle and test.
'expected' => null
]
];
}