public function CtoolsContextUnitTestCase::testOptionalRequiredContext in Chaos Tool Suite (ctools) 7
Tests that contexts have the correct required property value.
File
- tests/
context.test, line 364 - Test the keyword substitution functionality.
Class
- CtoolsContextUnitTestCase
- Test the context classes.
Code
public function testOptionalRequiredContext() {
$required_context = new ctools_context_required('test1');
$this
->assertTrue($required_context->required);
$optional_context = new ctools_context_optional('test2');
$this
->assertFalse($optional_context->required);
}