$this->assertGreaterThan(1, $title = $crawler->filter('div[id=article] h1')->extract(['_text']));
$this->assertContains('My updated title hehe :)', $title[0]);
- $this->assertGreaterThan(1, $stats = $crawler->filter('div[class=tools] ul[class=stats] li a[class=tool]')->extract(['_text']));
+ $this->assertGreaterThan(1, $stats = $crawler->filter('div[class="tools grey-text"] ul[class=stats] li a[class="tool grey-text"]')->extract(['_text']));
$this->assertContains('example.io', trim($stats[1]));
}
$this->assertGreaterThan(1, $title);
$this->assertContains('My updated title hehe :)', $title[0]);
- $stats = $crawler->filter('div[class=tools] ul[class=stats] li a[class=tool]')->extract(['_text']);
+ $stats = $crawler->filter('div[class="tools grey-text"] ul[class=stats] li a[class="tool grey-text"]')->extract(['_text']);
$this->assertCount(1, $stats);
$this->assertNotContains('example.io', trim($stats[0]));
}
$this->logInAs('admin');
$client = $this->getClient();
+ $em = $this->getEntityManager();
+
+ $today = new \DateTimeImmutable();
+ $tomorrow = $today->add(new \DateInterval('P1D'));
+ $yesterday = $today->sub(new \DateInterval('P1D'));
+
+ $entry = new Entry($this->getLoggedInUser());
+ $entry->setUrl('http://0.0.0.0/testFilterOnCreationDate');
+ $entry->setCreatedAt($yesterday);
+ $em->persist($entry);
+ $em->flush();
+
$crawler = $client->request('GET', '/unread/list');
$form = $crawler->filter('button[id=submit-filter]')->form();
$data = [
- 'entry_filter[createdAt][left_date]' => date('d/m/Y'),
- 'entry_filter[createdAt][right_date]' => date('d/m/Y', strtotime('+1 day')),
+ 'entry_filter[createdAt][left_date]' => $today->format('Y-m-d'),
+ 'entry_filter[createdAt][right_date]' => $tomorrow->format('Y-m-d'),
];
$crawler = $client->submit($form, $data);
$this->assertCount(5, $crawler->filter('li.entry'));
$data = [
- 'entry_filter[createdAt][left_date]' => date('d/m/Y'),
- 'entry_filter[createdAt][right_date]' => date('d/m/Y'),
+ 'entry_filter[createdAt][left_date]' => $today->format('Y-m-d'),
+ 'entry_filter[createdAt][right_date]' => $today->format('Y-m-d'),
];
$crawler = $client->submit($form, $data);
$this->assertCount(5, $crawler->filter('li.entry'));
$data = [
- 'entry_filter[createdAt][left_date]' => '01/01/1970',
- 'entry_filter[createdAt][right_date]' => '01/01/1970',
+ 'entry_filter[createdAt][left_date]' => '1970-01-01',
+ 'entry_filter[createdAt][right_date]' => '1970-01-01',
];
$crawler = $client->submit($form, $data);
'de',
],
'it' => [
- 'http://www.ansa.it/sito/notizie/mondo/europa/2017/06/08/voto-gb-seggi-aperti-misure-sicurezza-rafforzate_0cb71f7f-e23b-4d5f-95ca-bc12296419f0.html',
+ 'https://www.ansa.it/sito/notizie/mondo/europa/2017/06/08/voto-gb-seggi-aperti-misure-sicurezza-rafforzate_0cb71f7f-e23b-4d5f-95ca-bc12296419f0.html',
'it',
],
'zh_CN' => [