Phalcon\Test\Mvc\Model\Behavior\NestedSetTest::testShouldCreateNestedSetBehaviorInstanceWithDesiredParams PHP 메소드

testShouldCreateNestedSetBehaviorInstanceWithDesiredParams() 공개 메소드

Initialize NestedSet Behavior with desired params
부터: 2016-02-27
저자: 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()]]]);
    }