public function testNotExplicitlySettingDetectorWillCreateOne() { $view = new \Dewdrop\View\View(); $field = $this->getTestField(); $view->detectEditHelper()->customize($field, 'wpInputCheckbox'); $output = $view->detectEditHelper()->render($field); $this->assertMatchesDomQuery('input[type="checkbox"]', $output); }
public function testCustomizeMethodCallsRelatedMethodOnDetectorObject() { $view = new View(); $this->detector->expects($this->once())->method('customizeField')->with('model:field_name', 'wpSelect'); $view->detectEditHelper()->setDetector($this->detector)->customize('model:field_name', 'wpSelect'); }