/** * XXX As we do not have fixtures for now we do not provide ticket type here * @test */ public function itShouldShowTheProvidedData() { $data = array('reporter' => 'hans', 'id' => 'T2445', 'created' => '2012-06-24'); $crawler = $this->client->request('GET', 'template/ticket.html?' . http_build_query($data) . '&title=foo'); $data['id'] = substr($data['id'], 1); foreach ($data as $key => $value) { $this->assertEquals(1, $crawler->filter('div.big-meta p:contains("' . $value . '")')->count(), $value); } $this->assertEquals(1, $crawler->filter('#text:contains("foo")')->count()); }
/** * @test */ public function itShouldBeJavascript() { $crawler = $this->client->request('GET', 'buttons/loader.js'); $response = $this->client->getResponse(); $this->assertEquals('application/javascript', $response->headers->get('content-type')); }