You are here

public function oa_core_section_is_publicUnitTest::testoa_core_section_is_public_fail in Open Atrium Core 7.2

File

tests/oa_core_section_is_publicUnit.test, line 29
Tests the public interface of the oa_core_section_is_public function.

Class

oa_core_section_is_publicUnitTest
@file Tests the public interface of the oa_core_section_is_public function.

Code

public function testoa_core_section_is_public_fail() {
  $node = (object) array(
    'field_oa_group_ref' => array(
      LANGUAGE_NONE => array(
        'something',
      ),
    ),
    'field_oa_team_ref' => array(
      LANGUAGE_NONE => array(),
    ),
    'field_oa_user_ref' => array(
      LANGUAGE_NONE => array(),
    ),
  );
  $this
    ->assertEqual(oa_core_section_is_public($node), FALSE, 'If Node does has a group visibilty setting then it is not public');
  $node = (object) array(
    'field_oa_group_ref' => array(
      LANGUAGE_NONE => array(),
    ),
    'field_oa_team_ref' => array(
      LANGUAGE_NONE => array(
        "something",
      ),
    ),
    'field_oa_user_ref' => array(
      LANGUAGE_NONE => array(),
    ),
  );
  $this
    ->assertEqual(oa_core_section_is_public($node), FALSE, 'If Node does has a team visibilty setting then it is not public');
  $node = (object) array(
    'field_oa_group_ref' => array(
      LANGUAGE_NONE => array(),
    ),
    'field_oa_team_ref' => array(
      LANGUAGE_NONE => array(),
    ),
    'field_oa_user_ref' => array(
      LANGUAGE_NONE => array(
        "something",
      ),
    ),
  );
  $this
    ->assertEqual(oa_core_section_is_public($node), FALSE, 'If Node does has a user visibilty setting then it is not public');
}