function CtoolsContextUnitTestCase::testOptionalRequiredContext

Tests that contexts have the correct required property value.

File

tests/context.test, line 364

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);
}