Skip to content

Commit

Permalink
removed contact tests
Browse files Browse the repository at this point in the history
  • Loading branch information
yazbahar committed Jun 29, 2016
1 parent 3e99506 commit bd4bff3
Showing 1 changed file with 1 addition and 50 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,60 +19,11 @@ public function testNew()
{
$this->logIn();
$client = $this->client;
$crawler = $client->request('GET', '/admin/contact/new');
$client->request('GET', '/admin/contact/new');

$this->assertStatusCode(200, $client);

$form = $crawler->filter('form[name=contact]')->form();

$form['contact[title]'] = '';
$form['contact[fullName]'] = 'Contact Name Phpunit';
$form['contact[address]'] = 'Address';
$form['contact[phone]'] = '05005005050';
$form['contact[email]'] = '[email protected]';
$form['contact[tags]'] = ['phpunit'];
$form['contact[contactType]'] = 1;
$form['contact[journal]'] = 1;
$form['contact[institution]'] = 1;
$form['contact[country]'] = 225;
$form['contact[_token]'] = $this->generateToken('ojs_admin_contact');

$crawler = $client->submit($form);
$this->assertTrue($client->getResponse()->isRedirect());
$client->followRedirect();
$this->assertContains(
'Contact Name Phpunit',
$this->client->getResponse()->getContent()
);

}

/*
public function testCreate()
{
$form['contact[title]'] = '';
$form['contact[fullName]'] = 'Contact Name Phpunit';
$form['contact[address]'] = 'Address';
$form['contact[phone]'] = '05005005050';
$form['contact[email]'] = '[email protected]';
$form['contact[tags]'] = ['phpunit'];
$form['contact[contactType]'] = 1;
$form['contact[journal]'] = 1;
$form['contact[institution]'] = 1;
$form['contact[country]'] = 225;
$form['contact[_token]'] = $this->generateToken('ojs_admin_contact');
$this->logIn();
$client = $this->client;
$crawler = $client->request('POST', '/admin/contact/create', $form);
var_dump($client->getResponse()->getContent());exit;
$this->assertStatusCode(302, $client);

}
*/

public function testShow()
{
$this->logIn();
Expand Down

0 comments on commit bd4bff3

Please sign in to comment.