/** * Sets view component. * * @param ViewComponentInterface $view * @return $this */ public function setView(ViewComponentInterface $view = null) { if ($view === $this->view) { return $this; } $this->view && $this->view->detach(); $view && $view->attachTo($this); $this->view = $view; return $this; }
protected static function assertRendersCss(ViewComponentInterface $component, $url) { $output = $component->render(); self::assertStringStartsWith('<link ', $output); self::assertContains("href=\"{$url}\"", $output); }
/** * @param ViewComponentInterface|AutoSubmittingInputInterface $component */ protected function assertTurnedOn($component) { self::assertContains($this->submitScriptMarker, $component->render()); self::assertTrue($component->isAutoSubmitted()); self::assertTrue($component->getAutoSubmitting()); }