protected function setUp(): void
{ $this->environmentMock =
$this->
createMock(Environment::
class);
/** This is a fix for a autoload issue in the testsuite. Do not delete. */
class_exists(CoreExtension::
class);
} public function testSwGetAttributeValueNull(): void
{ $object =
new ArrayStruct(['test' => null
]);
$result =
sw_get_attribute($this->environmentMock,
new Source('', 'empty'
),
$object, 'test'
);
static::
assertEquals('',
$result);
} public function testSwGetAttributeValueBool(): void
{ $object =
new ArrayStruct(['test' => true
]);
$result =
sw_get_attribute($this->environmentMock,
new Source('', 'empty'
),
$object, 'test'
);
static::
assertTrue($result);