Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- protected $tester;
- protected function _before()
- {
- }
- protected function _after()
- {
- }
- // tests
- public function testisEmailAvailalable()
- {
- $email = 'alk@gmail.com';
- $dsn = 'mysql:host=localhost;dbname=rewards';
- $username = 'root';
- $password = 'password';
- $connection = new yiidbConnection([
- 'dsn' => $dsn,
- 'username' => $username,
- 'password' => $password,
- ]);
- /*$connection->open();*/
- $command = $connection->createCommand('SELECT email FROM acc_user');
- $emailIds = $command->query();
- $emailIdArray = array($emailIds);
- $this->assertContains('alk@gmail.com',$emailIdArray);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement