Fhaculty\Graph\Tests\Attribute\AbstractAttributeAwareTest::testAttributeSetGetDefault PHP Method

testAttributeSetGetDefault() public method

public testAttributeSetGetDefault ( Fhaculty\Graph\Attribute\AttributeAware $entity )
$entity Fhaculty\Graph\Attribute\AttributeAware
    public function testAttributeSetGetDefault(AttributeAware $entity)
    {
        $entity->setAttribute('test', 'value');
        $this->assertEquals('value', $entity->getAttribute('test'));
        $this->assertEquals(null, $entity->getAttribute('unknown'));
        $this->assertEquals('default', $entity->getAttribute('unknown', 'default'));
    }