From e239fe12b62a6539a90689c94849c78c113d73f7 Mon Sep 17 00:00:00 2001 From: Eirik Stanghelle Morland Date: Sun, 28 Jul 2024 16:11:51 +0200 Subject: [PATCH] Update UnitTest.php --- tests/Unit/UnitTest.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/Unit/UnitTest.php b/tests/Unit/UnitTest.php index 5b57f73..dd99928 100644 --- a/tests/Unit/UnitTest.php +++ b/tests/Unit/UnitTest.php @@ -78,4 +78,12 @@ public function testFromNodeWithRoles() $this->assertEquals(1, $data->getNid()); $this->assertEquals(['role1', 'role2'], $data->getRoles()); } + + public function testFromNodeWithEnv() + { + $node = new DummyNode(); + $node->set('field_environment_variables', 'FOO=bar'); + $data = ProjectData::fromNode($node); + self::assertEquals(['FOO' => 'bar'], $data->getEnvArray()); + } }