public function it_resolves_issue_from_request_data(Request $request, Issue $issue, ParameterBag $attributes) { $request->getRequestUri()->willReturn('/en/may2014/60/test-article.htm'); $issue->getId()->willReturn(1); $issue->getNumber()->willReturn(10); $issue->getName()->willReturn("May 2014"); $issue->getShortName()->willReturn("may2014"); $language = new Language(); $language->setId(1); $language->setCode("en"); $issue->getLanguage()->willReturn($language); $issue->getLanguageId()->willReturn("1"); $request->attributes = $attributes; $this->issueResolver($request)->shouldReturn($issue); $this->getIssueMetadata()->shouldBeLike(array("id" => 1, "number" => 10, "name" => "May 2014", "shortName" => "may2014", "code_default_language" => "en", "id_default_language" => "1")); }
public function getLanguageId() { $this->__load(); return parent::getLanguageId(); }