示例#1
0
 /**
  * @inheritdoc
  */
 public function fixtures()
 {
     return ['user' => ['class' => UserFixture::className()], 'user_follow' => ['class' => UserFollowFixture::className()], 'space' => ['class' => SpaceFixture::className()]];
 }
示例#2
0
 public function fixtures()
 {
     return ['users' => ['class' => UserFixture::className(), 'dataFile' => '@tests/codeception/unit/fixtures/data/user-email-confirm.php']];
 }
示例#3
0
 /**
  * @inheritdoc
  */
 public function fixtures()
 {
     return ['user' => ['class' => UserFixture::className()], 'invite' => ['class' => InviteFixture::className()], 'group' => ['class' => GroupFixture::className()], 'space' => ['class' => SpaceFixture::className()], 'space_membership' => ['class' => SpaceMembershipFixture::className()]];
 }
 /**
  * @inheritdoc
  */
 public function fixtures()
 {
     return ['user' => ['class' => UserFixture::className(), 'dataFile' => '@tests/codeception/fixtures/data/init_user.php'], 'token' => ['class' => TokenFixture::className(), 'dataFile' => '@tests/codeception/fixtures/data/init_token.php']];
 }
 /**
  * @inheritdoc
  */
 public function fixtures()
 {
     return ['user' => ['class' => UserFixture::className()], 'user_follow' => ['class' => UserFollowFixture::className()], 'group' => ['class' => GroupFixture::className()], 'space' => ['class' => SpaceFixture::className()], 'space_membership' => ['class' => SpaceMembershipFixture::className()], 'wall' => ['class' => WallFixture::className()], 'wall_entry' => ['class' => WallEntryFixture::className()], 'content' => ['class' => ContentFixture::className()], 'post' => ['class' => PostFixture::className()]];
 }
 /**
  * @inheritdoc
  */
 public function fixtures()
 {
     return ['users' => UserFixture::className(), 'words' => WordFixture::className()];
 }
示例#7
0
 /**
  * Fixtures
  *
  * @return array
  */
 public function _fixtures()
 {
     return ['users' => UserFixture::className()];
 }
示例#8
0
 /**
  * @inheritdoc
  */
 public function fixtures()
 {
     return ['user' => ['class' => UserFixture::className()], 'password' => ['class' => \tests\codeception\fixtures\UserPasswordFixture::className()]];
 }
示例#9
0
 /**
  * @inheritdoc
  */
 public function fixtures()
 {
     return ['user' => ['class' => UserFixture::className(), 'dataFile' => '@tests/codeception/fixtures/data/user.php']];
 }
示例#10
0
 /**
  * Tests fixtures
  */
 public function _fixtures()
 {
     return ['users' => UserFixture::className(), 'projects' => ProjectFixture::className()];
 }
示例#11
0
<?php

use tests\codeception\_pages\LoginPage;
use tests\codeception\fixtures\UserFixture;
/* @var $scenario Codeception\Scenario */
$fixture = new UserFixture();
$fixture->load();
$user = $fixture->getModel('default');
$I = new AcceptanceTester($scenario);
$I->wantTo('ensure that login works');
$loginPage = LoginPage::openBy($I);
$I->see('Login', 'h1');
$I->amGoingTo('try to login with empty credentials');
$loginPage->login('', '');
if (method_exists($I, 'wait')) {
    $I->wait(3);
    // only for selenium
}
$I->expectTo('see validations errors');
$I->see('Username cannot be blank.');
$I->see('Password cannot be blank.');
$I->amGoingTo('try to login with a not existing username');
$loginPage->login('does-not-exist', 'wrong');
if (method_exists($I, 'wait')) {
    $I->wait(3);
    // only for selenium
}
$I->expectTo('see validations errors');
$I->see('Incorrect username or password.');
$I->amGoingTo('try to login with a wrong password');
$loginPage->login($user->username, 'wrong');
示例#12
0
 /**
  * @inheritdoc
  */
 public function fixtures()
 {
     return ['admin' => ['class' => AdminFixture::className(), 'dataFile' => '@tests/codeception/fixtures/data/admin.php'], 'user' => ['class' => UserFixture::className(), 'dataFile' => '@tests/codeception/fixtures/data/init_login.php']];
 }
 /**
  * @inheritdoc
  */
 public function fixtures()
 {
     return ['user' => ['class' => UserFixture::className()], 'space' => ['class' => SpaceFixture::className()], 'space_membership' => ['class' => SpaceMembershipFixture::className()], 'contentcontainer' => ['class' => ContentContainerFixture::className()]];
 }