Phalcon\Test\Mvc\Model\Behavior\NestedSetTest::testShouldCreateNestedSetBehaviorInstanceWithDesiredParams PHP Method

testShouldCreateNestedSetBehaviorInstanceWithDesiredParams() public method

Initialize NestedSet Behavior with desired params
Since: 2016-02-27
Author: Serghei Iakovlev ([email protected])
    public function testShouldCreateNestedSetBehaviorInstanceWithDesiredParams()
    {
        $this->specify('Unable to initialize NestedSet Behavior with desired params correctly', function ($property, $value) {
            $behavior = new NestedSetBehavior([$property => $value]);
            expect($this->getProperty($property, $behavior))->equals($value);
        }, ['examples' => [['leftAttribute', 'left'], ['rightAttribute', 'right'], ['rootAttribute', 'main'], ['levelAttribute', 'lvl'], ['hasManyRoots', true], ['primaryKey', 'pk'], ['db', $this->getConnection()]]]);
    }