protected function setUp() { $this->client = static::createClient(); $this->client->followRedirects(true); $this->crawler = $this->client->request('GET', self::LOGIN_URL); $this->loginForm = $this->crawler->selectButton(self::LOGIN_BUTTON)->form(); }
public function setUp() { parent::setUp(); $this->loadFixtures(["Dende\\Bundle\\AppBundle\\DataFixtures\\ORM\\TasksData", "Dende\\Bundle\\AppBundle\\DataFixtures\\ORM\\TodoListsData"]); $this->client = static::makeClient(); $this->client->followRedirects(true); }
/** * Do login with username * * @param string $username */ private function doLogin($username = '******') { $crawler = $this->client->request('GET', $this->getUrl('fos_user_security_login', array())); $form = $crawler->selectButton('_submit')->form(array('_username' => $username, '_password' => 'qwerty')); $this->client->submit($form); $this->assertTrue($this->client->getResponse()->isRedirect()); $this->client->followRedirects(); }
/** * @return void */ public function setUp() { parent::setUp(); $this->faker = $this->getContainer()->get("hautelook_alice.faker"); error_reporting(E_ALL & ~E_USER_DEPRECATED); $this->client = static::makeClient(); $this->client->followRedirects(true); $this->fixtures = $this->loadFixtureFiles(['@AppBundle/DataFixtures/ORM/test/calendars.yml', '@AppBundle/DataFixtures/ORM/test/events.yml', '@AppBundle/DataFixtures/ORM/test/occurrences.yml', '@AppBundle/DataFixtures/ORM/test/workshops.yml', '@AppBundle/DataFixtures/ORM/test/lessons.yml']); }
/** * изменение приоритета/показ флеша */ public function testTicketChangePriority() { $this->client->followRedirects(); $crawler = $this->client->request('GET', '/ticket/6/show?_locale=ru'); $form = $crawler->selectButton('Message[changePriority]')->form(); /** @var $priority ChoiceFormField */ $priority = $form['Message[priority]']; $priorityOptions = $priority->availableOptionValues(); $priority->select($priorityOptions[1]); $crawler = $this->client->submit($form); static::assertTrue($this->client->getResponse()->isSuccessful(), 'response status is 2xx'); static::assertGreaterThan(0, $crawler->filter('html:contains("Приоритет изменен")')->count()); }
public function setUp() { parent::setUp(); $this->client = static::createClient(); $this->client->followRedirects(true); }
/** * Enables automatic redirects to be followed by the client */ public function startFollowingRedirects() { $this->client->followRedirects(true); }