You are here

public function ServicesClientPluginsTestCase::testServicesClientMappingValue in Services Client 7.2

File

tests/plugin.test, line 189
Rules tests.

Class

ServicesClientPluginsTestCase
@file Rules tests.

Code

public function testServicesClientMappingValue() {
  $this
    ->loadFiles();
  $source = new ServicesClientMappingValue();
  $this
    ->assertIdentical($source
    ->isEmpty(), FALSE, "Default value is not empty");
  $this
    ->assertIdentical($source
    ->getValue(), array(), "Default value is empty array");
  $source
    ->setEmpty();
  $this
    ->assertIdentical($source
    ->isEmpty(), TRUE, "Reports empty when set.");
  $source
    ->setNotEmpty();
  $this
    ->assertIdentical($source
    ->isEmpty(), FALSE, "Reports not empty when set");
  $source
    ->setValue("TEST");
  $this
    ->assertIdentical($source
    ->getValue(), "TEST", "Setting value will change value in object");
}