forked from jonesn5/Moviefy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSignUpTest.php
62 lines (42 loc) · 1.23 KB
/
SignUpTest.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<?php
class SignUpTest extends PHPUNIT\Framework\TestCase
{
public function testUserName()
{
require 'register.php';
$user = new User;
$user->userName = "root";
$this->assertEquals('root', $user->getUserName());
}
public function testValidUserName()
{
require 'register.php';
$user = new User;
$user->userName = "root";
$this->assertTrue($user->checkValidUserName());
}
public function testPassword()
{
require 'register.php';
$user = new User;
$user->password = "password";
$this->assertTrue($user->checkValidPassword());
}
public function testEmptyByDefault(){
require 'register.php';
$user = new User;
$this->assertEquals('', $user->getUserName());
}
public function testIsEmpty(){
require 'register.php';
$user = new User;
$this->assertTrue($user->checkEmpty());
}
public function testIsNotEmpty(){
require 'register.php';
$user = new User;
$user->userName = "root";
$user->password = "password";
$this->assertFalse($user->checkEmpty());
}
}