public function testDirname() { $this->assertEquals(dirname($this->contentFile), f::dirname($this->contentFile)); }
/** * Create and add a new tab to the wizard dialog. * * @param array $step Optional attributes */ public function add($step = array()) { $index = count($this->queue) + 1; $base = f::dirname($this->file); // Provide default values for each step $defaults = array('title' => sprintf(l('comments.wizard.title', 'Step %s'), $index), 'desc' => '', 'url' => $this->url($index), 'index' => $index, 'base' => $base, 'template' => 'steps' . DS . 'step-' . $index, 'required' => true, 'rules' => array(), 'wizard' => $this); // Create a new view with the given attributes $scope = array_merge($defaults, $step); $partial = $base . DS . $scope['template'] . '.php'; return $this->queue[] = $this->nest('content', $partial)->with($scope); }