Skip to content

Commit 982b835

Browse files
Add additional test for Variable class
1 parent ab76017 commit 982b835

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests/Unit/VariableTest.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,17 @@ public function testToQuery(string $variable, string $expected)
4242
$this->assertSame($expected, $variable->toQuery());
4343
}
4444

45+
public function testEmptyConstructor()
46+
{
47+
$variable = new Variable();
48+
49+
$this->assertMatchesRegularExpression('/[0-9a-f]+/', $variable->toQuery());
50+
51+
$variable = new Variable(null);
52+
53+
$this->assertMatchesRegularExpression('/[0-9a-f]+/', $variable->toQuery());
54+
}
55+
4556
/**
4657
* @dataProvider providePropertyData
4758
* @param string $variable

0 commit comments

Comments
 (0)