You are here

public function UnitTest::testSerializeValuesForm in TacJS 8

@covers Drupal\tacjs\TacjsSettings::getFields

File

tests/src/Unit/UnitTest.php, line 49

Class

UnitTest
Simple test to ensure that asserts pass.

Namespace

Drupal\tacjs

Code

public function testSerializeValuesForm() {
  $values = [
    "type_social_networks" => [
      "facebook" => "facebook",
    ],
    "submit" => [],
    "form_build_id" => "",
    "form_token" => "",
    "form_id" => "",
    "op" => [],
  ];
  $result = [
    "type_social_networks" => [
      "facebook" => "facebook",
    ],
  ];
  $result = serialize($result);
  $this
    ->assertEquals($result, $this->unit
    ->serializeValuesForm($values));
}